JavaScript suggest change

Objects

Syntax

Parameters

PropertyDescription
valueThe value to assign to the property.
writableWhether the value of the property can be changed or not.
enumerableWhether the property will be enumerated in for in loops or not.
configurableWhether it will be possible to redefine the property descriptor or not.
getA function to be called that will return the value of the property.
setA function to be called when the property is assigned a value.

Objects are collections of key-value pairs, or properties. The keys can be Strings or Symbols, and values are either primitives (numbers, strings, symbols) or references to other objects.

In JavaScript, a significant amount of values are objects (e.g. functions, arrays) or primitives that behave as immutable objects (numbers, strings, booleans). Their properties or their prototype’s properties can be accessed using dot (obj.prop) or bracket (obj['prop']) notation. Notable exceptions are the special values undefined and null.

Objects are held by reference in JavaScript, not by value. This means that when copied or passed as arguments to functions, the “copy” and the original are references to the same object, and a change to one’s properties will change the same property of the other. This does not apply to primitives, which are immutable and passed by value.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Table Of Contents
13 Objects
17 Map
18 Set
28 Date
31 AJAX
42 JSON
104 Tilde
107 Events
  ↑ ↓ to navigate     ↵ to select     Esc to close