πŸ“Š JavaScript
Q. In this snippet, firstname and surname are
Code:
var book = {
    "main title": "JavaScript", 
    'sub-title': "The Definitive Guide", 
    "for": "all audiences", 
    author: { 
      firstname: "David", 
      surname: "Flanagan" 
    }
  };
  • (A) properties
  • (B) property values
  • (C) property names
  • (D) objects
πŸ’¬ Discuss
βœ… Correct Answer: (C) property names

Explanation: firstname and surname are the property names. The value of that particular property is itself an object. That is why these property names are unquoted.

Explanation by: Tanmay
firstname and surname are the property names. The value of that particular property is itself an object. That is why these property names are unquoted.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
191
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Tanmay
Publisher
πŸ“ˆ
88%
Success Rate