object js expained 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: objects in javascript
let name = {
name1: 'mark'
}
function Car(make, model, year) {
this.make = make;
this.model = model;
this.year = year;
}
let name = {
name1: 'mark'
}