Objects
let a = { // Declaration of an object
name: "Joe"
};
let b = {id: 1, name: "Sara"}; // Can also be declared in a single line[1, 2, 3] // Array, an ordered list-like collection with special behavior
function f() {} // Function, reusable sets of statements
2024-06-21T17:55:33.711Z // Date, for storing date and time value
Math..random() // Built-in Object with mathemathical functionsAttributes and Methods
let user = {
name: "Joe",
age: 30
};
console.log(user.age); // Access the value of the attribute age, prints 30Factory Functions and Destructured Assignment
The this Keyword
Getters and Setters
Last updated