Tin mới
JavaScript: Scripting language
Web APIs: Programming interfaces
Structuring content with HTML module
Dynamic scripting with JavaScript module
Object literal syntax vs. JSON
The object literal syntax is not the same as the JavaScript Object Notation (JSON). Although they look similar, there are differences between them:
Object literal syntax vs. JSON
The object literal syntax is not the same as the JavaScript Object Notation (JSON). Although they look similar, there are differences between them:
Once you have created an object, you might want to read or change them. Object properties can be accessed by using the dot notation or the bracket notation. (See property accessors for detailed information.)
We have already learned how to notate properties using the initializer syntax. Oftentimes, there are variables in your code that you would like to put into an object. You will see code like this:
We have already learned how to notate properties using the initializer syntax. Oftentimes, there are variables in your code that you would like to put into an object. You will see code like this:
We have already learned how to notate properties using the initializer syntax. Oftentimes, there are variables in your code that you would like to put into an object. You will see code like this:
A property of an object can also refer to a function or a getter or setter method.
A property of an object can also refer to a function or a getter or setter method.
A property of an object can also refer to a function or a getter or setter method.
A property of an object can also refer to a function or a getter or setter method.
A property definition of the form __proto__: value or "__proto__": value does not create a property with the name __proto__. Instead, if the provided value is an object or null, it points the [[Prototype]] of the created
This page was last modified on Jul 8, 2025 by MDN contributors.