exam questions

Exam 98-382 All Questions

View all questions & answers for the 98-382 exam

Exam 98-382 topic 1 question 34 discussion

Actual exam question from Microsoft's 98-382
Question #: 34
Topic #: 1
[All 98-382 Questions]

This question requires that you evaluate the underlined text to determine if it is correct.
You review the following JavaScript code:

When this code executes, the value of x is 0.
Review the underlined text. If it makes the statement correct, select "No change is needed". If the statement is incorrect, select the answer choice that makes the statement correct.

  • A. No change is needed
  • B. the value of x is 3
  • C. the value of x is 5
  • D. the value of x is undefined
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️
References: https://www.w3schools.com/js/js_arithmetic.asp

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
dev_ash
3 years, 3 months ago
x %= means that x is equal to the result of x % (modulo) the equal value (in this case 5). Therefore 15 % 5 = 0 (5 goes into 15, 3 times with a remainder of zero). The result is in fact 0
upvoted 2 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 ...