Object Property in JavaScript
Level 251 keystrokes
This creates an object with a name property and outputs 'Bob'.
JavaScript code
// Objects are created with curly braces {}// Properties are key: value pairs1let user = { name: "Bob" };// Access properties with dot notation: object.property// user.name gets the value of the name property2console.log(user.name);Output
Bob
Practice typing this code. Results are not recorded in the rankings.
Symbols in this code
The symbols you type in this JavaScript code and how often they appear.
;× 2.× 2"× 2:× 1(× 1)× 1{× 1}× 1=× 1