πŸ“Š JavaScript
Q. Consider the following code snippet :
var book = {
"main title": "JavaScript",
'sub-title': "The Definitive Guide",
"for": "all audiences",
author: {
firstname: "David",
surname: "Flanagan"
}
};
In the above snippet, firstname and surname are
  • (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: Mr. Dubey
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

πŸ‘οΈ
106
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
84%
Success Rate