exam questions

Exam 98-382 All Questions

View all questions & answers for the 98-382 exam

Exam 98-382 topic 1 question 15 discussion

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

You are writing an engineering application. You need to create a function that will round numbers to 3 or more decimal places.
You need to create a function that receives the following two parameters:
✑ The value parameter is the number to be formatted
✑ The digits parameter is the number of digits to display
The function must return the value with the number of digits specified.
Which function should you use?

A.

B.

C.

D.

Show Suggested Answer Hide Answer
Suggested Answer: C
References: https://www.w3schools.com/jsref/jsref_tofixed.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
SP_RSA
2 years ago
Sorry B is the correct answer. function sig(value,digits) { return value.toFixed(digits); }; console.log(sig(1.2343, 2));
upvoted 1 times
...
SP_RSA
2 years ago
C is the correct answer
upvoted 1 times
...
Sathya235
3 years, 5 months ago
C - is the answer
upvoted 2 times
...
kisskeo
3 years, 8 months ago
B - Correct
upvoted 1 times
...
w35l3y
3 years, 12 months ago
The images are above the letters. So the letter C is "toFixed", which is the correct answer
upvoted 3 times
...
toby5
4 years ago
Answer B is correct: function significance(value, digits) { return value.toFixed(digits); } significance(1, 3); // output "1.000"
upvoted 2 times
yoursterra
1 year, 8 months ago
Look again... The answer with ...value.toFixed(digits); is actually C... Basically, The answers are above the corresponding letters.
upvoted 1 times
...
...
[Removed]
4 years, 1 month ago
tofixed correct
upvoted 3 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 ...