Identify the correct syntax to add methods to a custom object.
A) var objName = { function: method () { commands } }
B) var objName = { method: function() { commands } }
C) Commands = { method: function() { var objName } }
D) var objName = { function() { method() } }
Correct Answer:
Verified
Q19: Instantiating an object from a constructor function
Q20: When an object is instantiated from a
Q21: . If the constructor function is a
Q22: Which of the following commands is used
Q23: Identify the method that ensures that the
Q25: Identify the structure in which any function,
Q26: Identify the expression used to reference a
Q27: In an object literal, each _ pair
Q28: Which of the following objects is also
Q29: Which of the following methods is applied
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents