Search Header Logo

Built in math functions JS

Authored by Ibrahim Mohamed

Computers

11th Grade

Used 6+ times

Built in math functions JS
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of an if statement in JavaScript?

To repeat a block of code

To check if a condition is true and execute a block of code if it is

To declare a new variable

To comment out a line of code

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct syntax for an if statement in JavaScript?

if (condition)

if (condition) ... else ...

if { ... } else { ... }

if (condition)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following can be used as a condition in an if statement?

A Boolean expression (true/false)

A string

A number

A function

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Math.min(x, y, ...)

Math.max(x, y, ...)

Math.random()

Math.pow(x, y)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Function returns the absolute value of a number.

Math.abs(x)

Math.sqrt(x)

Math.ceil(x)

Math.round(x)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Function returns the square root of a number.

Math.abs(x)

Math.sqrt(x)

Math.ceil(x)

Math.round(x)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Function rounds a number to the nearest integer. (0.6 → 1) (0.2→0)

Math.abs(x)

Math.sqrt(x)

Math.ceil(x)

Math.round(x)

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?