Which line of code should you use?

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?

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”

C.
this.NewOrder. newProperty = “newProperty”

D.
NewOrder. newProperty = “newProperty”

Explanation:
http://www.w3schools.com/js/js_object_prototypes.asp



Leave a Reply 2

Your email address will not be published. Required fields are marked *


CasiProgramoMEXAPOWA

CasiProgramoMEXAPOWA

the correct answer is B, it needs to use prototype to add new property in the function definition

S

S

Yes, B is the correct answer.