js create object with properties
function Car(make, model, year) {
this.make = make;
this.model = model;
this.year = year;
}
js create object with properties
function Car(make, model, year) {
this.make = make;
this.model = model;
this.year = year;
}
access an object js
// Access an object's properties
const person1 = {};
person1['firstname'] = 'Mario';
person1['lastname'] = 'Rossi';
console.log(person1.firstname);
// expected output: "Mario"
const person2 = {
firstname: 'John',
lastname: 'Doe'
};
console.log(person2['lastname']);
// expected output: "Doe"
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us