In: Computer Science
Which of the following is/are true about JavaScript object properties?
A. To use dot notation, a property name must be a valid JavaScript identifier
B. All properties are automatically locally scoped but may be accessed by using ‘prototype’
C. Variables declared with var inside constructor functions are locally scoped and cannot be directly accessed as properties
D. Variables declared with var inside constructor functions are globally scoped
E. Properties that contain boolean values may not be accessed with bracket notation and are only accessible through “.” operation
A. To use dot notation, a property name must be a valid JavaScript identifier. TRUE
B. All properties are automatically locally scoped but may be accessed by using ‘prototype’. TRUE
C. Variables declared with var inside constructor functions are locally scoped and cannot be directly accessed as properties. TRUE
D. Variables declared with var inside constructor functions are globally scoped. FALSE
E. Properties that contain boolean values may not be accessed with bracket notation and are only accessible through “.” operation. FALSE