Javascript Object

September 17, 2019

Define Javascript Objaect

We will see how to define Javascript Object called Product with some properties like name and the id


var product = {
    id: 0001,
    name: 'Coca Cola 175ml',
    
};

How to access the property

You can use the dot syntax to access the property

console.log(product.name)