Literal notation vs Dot notation in Javascript



var myArray =[a:"book", b: "paper",c: "pen"];
myArray [a]; This is Literal Notation and gives us the value  "book".
myArray.a; This is Literal Notation and gives us the value "book"


Literal notation in object

var student= {
    total: 0
};

Dot notation in object

student.total = 0;

Comments

Popular posts from this blog

পিৎজা এবং বই

How to Download Video from Youtube - The Easiest way