Math methods in JavaScript

Working with pow and sqrt

Raise 2 to the power of 10.

Find the square root of 245.

Given the following array:

[4, 2, 5, 19, 13, 0, 10]

Find the square root of the sum of the cubes of its elements. Use the for loop to solve.

Working with rounding functions

Find the square root of 379. Round the result to integers, to tenths, to hundredths.

Find the square root of 587. Round the result up and down, write the rounding results to an object with keys 'floor' and 'ceil'.

Finding the maximum and minimum number

Given the numbers 4, -2, 5, 19, -130, 0, 10. Find the minimum and maximum number.

Working with random

Print a random integer from 1 to 100 on the screen.

Fill the array with 10 random integers using a loop.

Working with abs

The variables a and b are given. Find the absolute value of the difference a and b. Test the script yourself for various a and b.