READ Free Dumps For Microsoft- 70-480
Question ID 14992 | You develop an HTML5 application that interacts with a REST service. The REST service
accepts JSON data. A JavaScript object named form Data contains data that is sent to the
REST service.
You need to convert the JavaScript object named formData into JSON.
Which code segment should you use?
|
Option A | jQuery.ajax.valueOf(formData);
|
Option B | window.evai(formData);
|
Option C | JSON.stringify (formData);
|
Option D | formData.toString();
|
Correct Answer | C |
Explanation Explanation: JSON.stringify converts a JavaScript value to a JavaScript Object Notation (JSON) string. Reference: JSON.stringify Function (JavaScript)
Question ID 14993 | You are creating a JavaScript object that represents a customer.
You need to extend the Customer object by adding the GetCommission method.
You need to ensure that all future instances of the Customer object implement the
GetCommission method.
Which code segment should you use?
|
Option A | Option A
|
Option B | Option B
|
Option C | Option C
|
Option D | Option D
|
Correct Answer | D |
Explanation Explanation: * Object.prototype.constructor Returns a reference to the Object function that created the instance's prototype. Note that the value of this property is a reference to the function itself, not a string containing the function's name. The value is only read-only for primitive values such as 1, true and "test". * The constructor property is created together with the function as a single property of func.prototype. Reference: Object.prototype.constructor