HOTSPOT
You are developing an online shopping application that accepts credit cards for payment.
If the credit card number is invalid, the application must:
Generate an error
Assign “200” to the error number
Assign “Invalid” to the error description
You need to write the code that meets the requirements.
How should you write the code? (To answer, select the appropriate option from the drop-down list in the answer
area.)
Hot Area:

Explanation:
Example: throw new Error(200, “x equals zero”);
throw Statement (JavaScript)
Yet another very very very terrible question from your typical Microsoft exam.
https://developer.mozilla.org/nl/docs/Web/JavaScript/Reference/Global_Objects/Error
->
Vendor-specific extensions
Questions like these really shouldn’t exist and add zero value to the exam, shame
2
0
Also
https://docs.microsoft.com/en-us/scripting/javascript/reference/error-object-javascript
1
0
My answer was ‘new’, ‘Error’, ‘Description’, ‘Linenumber’. Of course it was the other way around although the Error object reference does not suggest so… message comes first.
new Error([message[, fileName[, lineNumber]]])
I agree, another bullshit question… which is answered also false in my opinion.
0
0
Last but not least when you create a new Error object it only gives you the possibility of a description. There are no other overloads which include a number.
0
0