JavaScript
Beginner
Basics
· 1 min read
JavaScript object basics
How do I store keyed data in JS?
Object literals.
Example
Interactive preview availableconst student = { name: 'Ada', year: 1 };
console.log(student.name);
student.year = 2;
Line-by-Line Walkthrough
JSON is the text format; objects are the in-memory structure.