Math Flashcards
1
Q
Use the correct Math method to create a random number and assign it to a variable named r.
A
let r = math.random();
2
Q
Use the correct Math method to return the largest number of 10 and 20 and assign it to a var named x.
A
let x = Math.max(10, 20);
3
Q
Use the correct Math method to round 5.3 to the nearest integer and assign it to a var named x.
A
let x = Math.round(5.3);
4
Q
Use the correct Math method to get the square root of 9 and assign it to a var named x
A
let x = Math.sqrt(9);