Junior JavaScript

What is an object in JavaScript?

An object is a collection of key-value pairs used to store related data and functions.

Example:

let person = { name: "Sandeep", age: 30 };

More from JavaScript Tutorial

All questions for this course