+1 vote
in JavaScript by (19.9k points)

What will be the output of the following JavaScript code?



var article = {  

              "main title": "How to learn JavaScript",   

              'sub-title': "The Definitive Guide",   

              "for": "all audiences",   

              author: {   

firstname: "Scott",   

                         surname: "McCall"   





a) Properties

b) property names

c) property values

d) objects

1 Answer

0 votes
by (23.1k points)

Answer: B

Reason: In the above-given code, a nested object (an object inside in the other object) is used, and "firstname","lastname" are the properties. The value of that individual property is itself an object.

Related questions