You are developing an application in HTML5. You have the following code. You need to add an additional property to the function definition. Which line of code should you use?
A.
NewOrder ["newProperty"] = "newProperty"
B.
NewOrder. prototype. newProperty = "newProperty"
The correct answer is B => "Adding Properties and Methods to Objects
Sometimes you want to add new properties (or methods) to all existing objects of a given type. Sometimes you want to add new properties (or methods) to an object constructor.
Using the prototype Property. The JavaScript prototype property allows you to add new properties to object constructors". This declaration is in the site of W3Schools.com.
This section is not available anymore. Please use the main Exam Page.70-480 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Liza
Highly Voted 5 years, 10 months agoRanukale
Highly Voted 5 years, 4 months agoalexcode
Most Recent 4 years, 8 months agoTonyBezerra
5 years, 5 months agopiroman
5 years, 6 months agoMrAnderson
5 years, 1 month ago