Skip to content

Instantly share code, notes, and snippets.

View alanphanth's full-sized avatar

someone who dev ⚡️ alanphanth

  • SUNSEEDER
  • Earth
View GitHub Profile
@alanphanth
alanphanth / Literals and properties
Created April 22, 2020 08:33
An object can be created with figure brackets {…} with an optional list of properties. A property is a “key: value” pair, where key is a string (also called a “property name”), and value can be anything.
let user = { // this is an object
name: "Alan",// by key "name" store value "Alan"
age: "27" // by key "age" store value 30
};
// ACCESS THE VALUES
user.name; //Alan
user.age; //27