bhylu.com

Advertisements

Object Path

An object groups related values under property names. Use one object when several fields describe the same thing.

Where to run this

This example uses the JavaScript console playground. Select Run to execute it; the example does not run on this lesson page.

A practical example

JavaScript

const session = {title: "Repair club", places: 12};
console.log(session.title);
console.log(session.places);

What happens

The output shows the title and place count.