Home » Interview » Technology

What are Math Constants and Functions using JavaScript?

Correct Answer: Math object has two constant : MathPI and MathE Math object has following functions: - Mathabs(val1); It will give absolute value of val1 - Mathmax(val1,val2); This fuction will return maximum value from val1 and val2 - Mathrandom(); This function will return a random number between 0 and 1 - Mathfloor(val1) This function will returns decimal value of val1

← Previous Question Next Question→

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion