I've used FireBug to test the two cases and they seem pretty similar by result:
>>> var x = {"active": "yes"}
>>> x.active
"yes"
>>> var x = {active: "yes"}
>>> x.active
"yes"
But I'm pretty sure there is some difference between these two, maybe even performance related difference. Bottom line - I'd like to know if there is a difference between {active: "yes"} and {"active": "yes"}.
Net User username /active:yes|no -- e.g. Net User Martin /active:yes -- Activates the account so that it can be used. Setting it to no deactivates the account.
WDAGUtilityAccount is a built-in user account. It's part of Windows Defender Application Guard (WDAG), which has been part of Windows 10 since version 1709. Usually, Application Guard is disabled by default. You can find it by opening the Command Prompt and typing the net user command.
In the Administrator: Command Prompt window, type net user and then press the Enter key. NOTE: You will see both the Administrator and Guest accounts listed. To activate the Administrator account, type the command net user administrator /active:yes and then press the Enter key.
Quick guide: Enable administrator account in Windows 10Type “cmd” and press [Ctrl] + [Shift] + [Enter]. Type “net user administrator /active:yes”. The administrator account is now activated.
Both are valid. However there are certain keywords you cant use like delete
so in order to avoid that you wrap them in quotes so they are not treated literally by the ECMAScript parser and instead are explicitly specified as strings.
Additionally, the JSON spec requires that keys have quotes around them:
A string begins and ends with
quotation marks
So {key:'value'}
is not valid JSON but is valid JS, while {"key":"value"}
is valid JS and JSON.
Examples of keywords and invalid/ambiguous keys:
>>> ({delete:1})
SyntaxError: Unexpected token delete
>>> ({'delete':1})
Object
Another example:
>>> ({first-name:'john'})
SyntaxError: Unexpected token -
>>> ({'first-name':'john'})
Object
>>> ({'first-name':'john'})['first-name']
"john"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With