Which function should you use?

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 . Option A
B . Option B
C . Option C
D . Option D

Answer: C

Explanation: https://www.w3schools.com/jsref/jsref_tofixed.asp

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments