Objects: Bundle the Facts
A game character has a name, a speed, and a score. Keeping three separate variables gets messy fast — an object keeps related facts together.
What you'll learn
Create an object with properties and read them with dots.
New command
let player = { name: "fox", speed: 40 }💻 Code Editorjs
🎬
Press Run Code to see your creation!