Home / CSE / Javascript - CS :: Discussion

Discussion :: Javascript - CS

  1. 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

  2. A.

     properties

    B.

     property values

    C.

     property names

    D.

     objects

    View Answer

    Workspace

    Answer : Option C

    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.


Be The First To Comment