Which of the following is true regarding object keys in JavaScript?

  • Object keys must be unique within an object.
  • Object keys can only be of type string.
  • Object keys are case-sensitive.
  • Object keys can only be integers.
Object keys in JavaScript are case-sensitive. This means that keys with different letter casing (e.g., 'key' and 'Key') are considered distinct in an object. The other options do not accurately describe the behavior of object keys.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *