Vidyalelo
JavaScript · Q54

Basic And Variables

Programming · JavaScript · question 54

Q54

Consider the below given syntax book[datatype]=assignment_value; In the above syntax, the datatype within the square brackets must be

A.
An integer
B.
A String
Answer
C.
An object
D.
None of the mentioned

Answer: Option B

Solution

Answer: Option B
Solution:
When using square bracket notation, the expression inside the square brackets must evaluate to a sting or a value that can be converted to a string.