Which of the following commands is used to add a method to a prototype.

A. objName.prototype.function = method;
B. objName.prototype.method = function;
C. objClass.prototype.method = function;
D. objInstance.prototype.function = method;


Answer: B

Computer Science & Information Technology

You might also like to view...

Define a base class to represent a Clock.

Your class should have instance variables for hours, minutes and seconds.

Computer Science & Information Technology

If a file needs to be cross-platform compatible, the file can be exported as a(n) ________ document

A) Adobe Portable Document Format B) HTML C) Rich Text Format D) plain text format

Computer Science & Information Technology

A nested function is a function placed inside another function

Indicate whether the statement is true or false.

Computer Science & Information Technology

Identify the letter of the choice that best matches the phrase or definition.

A. Searches for words with the same capitalization as the text that you type. B. Locates homonyms. C. Finds words that end with the text you type in the Search Document box. D. Finds the text as you type. E. Finds words that begin with the text you type in the Search Document box.

Computer Science & Information Technology