exam questions

Exam 70-480 All Questions

View all questions & answers for the 70-480 exam

Exam 70-480 topic 1 question 29 discussion

Actual exam question from Microsoft's 70-480
Question #: 29
Topic #: 1
[All 70-480 Questions]

DRAG DROP -
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, drag the appropriate code segment or segments to the correct location in the answer area. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Example: throw new Error(200, "x equals zero");
Reference: throw Statement (JavaScript)

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Huda
Highly Voted 6 years ago
The answer is throw new Error ( 200 , "invalid" )
upvoted 11 times
...
TonyBezerra
Highly Voted 5 years, 6 months ago
There are no options to choose. But i think the correct answer would be: throw new Erro(200, "invalid");
upvoted 5 times
Anette
4 years, 10 months ago
All options are: 1. Throw 2. 'Invalid" 3. 200 4. Error 5. break
upvoted 1 times
...
...
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.

SaveCancel
Loading ...