www.codecademy.com/learn/game-dev-learn-javascript-objects/modules/game-dev-learn-javascript-objects/cheatsheet
1 Users
0 Comments
18 Highlights
0 Notes
Tags
Top Highlights
built-in data type for storing key-value pairs.
the value of undefined will be returned by default.
even when they are declared as const.
the reference to the object,
cannot be changed.
they are passed by reference, not by value.
the object itself (not a copy) is accessible and mutable (can be changed) inside that function.
not private or protected.
no way to fully prevent incorrect interactions with object properties.
use getter and setter methods.
the internal value is stored as a property with an identifier that matches the getter and setter method names, but begins with an underscore (_).
using anonymous arrow function expressions, or with shorthand method syntax.
The number of variables can be less than the total properties of an object.
JavaScript arrow functions do not have their own this context, but use the this of the surrounding lexical context.
Since data does not exist in the global context, accessing this.data returns undefined.
allow for additional actions to be performed before these changes go into effect.
returns an object is known as a factory function.
accept parameters in order to customize the returned object.
Glasp is a social web highlighter that people can highlight and organize quotes and thoughts from the web, and access other like-minded people’s learning.