JavaScript Object Keys Quiz
Multiple ChoiceBeginner
Question
Which of the following is a valid way to create a JavaScript object?
Hint
JavaScript uses curly braces {} to create object literals.
Explanation
JavaScript objects are created with curly braces {} containing key-value pairs. Square brackets [] create arrays, parentheses () are for function parameters, and angle brackets <> are not used for object literals. The correct syntax is { name: 'Ada' }.
Related Resources
Related Cheatsheets
- JavaScript Cheatsheet
Quick reference for JavaScript object syntax.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.