1.

What Is The Difference Between Using Dot Notation And Bracket Notation When Accessing An Object’s Property?

Answer»

If using dot NOTATION, the property MUST be a STRING and refer to a property that EXISTS.

When using bracket notation, any valid JavaScript EXPRESSION that produces a value can be used inside the brackets, such as a variable or an an array element.

If using dot notation, the property must be a string and refer to a property that exists.

When using bracket notation, any valid JavaScript expression that produces a value can be used inside the brackets, such as a variable or an an array element.



Discussion

No Comment Found