AWS, JavaScript, React - Deploy Web Apps on the Cloud
 - JavaScript Math Round Function

AWS, JavaScript, React - Deploy Web Apps on the Cloud - JavaScript Math Round Function

Assessment

Interactive Video

Information Technology (IT), Architecture

University

Practice Problem

Hard

Created by

Wayground Content

FREE Resource

The video tutorial explains how to use the Math.round function in JavaScript to round numbers to the nearest integer. It demonstrates rounding 15.4 down to 15 and 15.6 up to 16. The tutorial also covers how to use Math.ceil and Math.floor to explicitly round numbers up or down, respectively. Examples are shown in a web browser to confirm the results.

Read more

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of using math.round on the number 15.4?

14

16

15

15.5

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function would you use to always round a number down to the nearest integer?

math.round

math.ceil

math.floor

math.trunc

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If you want to round 15.6 up to the nearest integer, which function should you use?

math.round

math.trunc

math.floor

math.ceil

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the result of math.floor applied to 15.6?

16

15

14

15.5

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Using math.ceil, what will 15.6 be rounded to?

17

15.5

16

15

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?