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
Post a Comment