when to use an object in javascript code example
Example 1: js create object with properties
function Car(make, model, year) {
this.make = make;
this.model = model;
this.year = year;
}
Example 2: javascript object
let names = {
name1: 'What ever you want to put'
}