JavaScript Objects Explained Simply
Objects keep related information together as named properties. A learner object might hold a name, a score, and a method for updating that score.
const learner = {
name: "Ada",
score: 0,
completeLesson() {
this.score += 1;
}
};
learner.completeLesson();
console.log(learner.name);
console.log(learner.score);Read more about Objects on MDN
AI panel
Ask AI to clarify the parts you don’t fully understand.