wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

FST Class 2023- Quiz 8

Total questions: 10

Worksheet time: 6mins

Name
Class
Date
1.

Which JavaScript object provides mathematical functions and constants?

a)

`Math`

b)

`Calc`

c)

`Arithmetic`

d)

`Number`

2.

What is the value of `Math.PI` in JavaScript?

a)

Approximately 3.14

b)

Approximately 2.71

c)

Approximately 1.61

d)

Exactly 3

3.

To find the nearest integer greater than or equal to a given number `x`, you can use:

a)

`Math.ceil(x)`

b)

`Math.floor(x)`

c)

`Math.round(x)`

d)

`Math.min(x)`

4.

Which `Math` method is used to calculate the square root of a number?

a)

`Math.sqrt(x)`

b)

`Math.squareRoot(x)`

c)

`Math.pow(x, 0.5)`

d)

`Math.square(x)`

5.

How can you generate a random integer between 1 and 100 (inclusive) in JavaScript using the `Math` object?

a)

`Math.random(1, 100)`

b)

`Math.floor(Math.random() * 100) + 1`

c)

`Math.random() * 100 + 1`

d)

`Math.ceil(Math.random() * 100)`

6.

What does the JavaScript `Date` object represent?

a)

A specific time and date

b)

Mathematical calculations

c)

A string of characters

d)

A conditional statement

7.

Which of the following is the correct way to create a `Date` object representing the current date and time?

a)

`new Date()`

b)
c)

`Date.current()`

d)

`new Date.now()`

8.

To get the month (0-11) from a `Date` object, you can use the method:

a)

`getMonth()`

b)

`month()`

c)

`getMonthIndex()`

d)

`date.getMonth()`

9.

How do you set the year of a `Date` object to 2022?

a)

`date.setYear(2022)`

b)

`date.year = 2022`

c)

`date.setFullYear(2022)`

d)

`date.year(2022)`

10.

Which `Date` method is used to retrieve the day of the week (0-6) from a `Date` object?

a)

`getDate()`

b)

`getDay()`

c)

`dayOfWeek()`

d)

`date.getDay()`