Interviewer And Interviewee Guide

JavaScript Interview Question:

What's Math Constants and Functions using JavaScript?

Submitted by: Administrator
The Math object contains useful constants such as
Math.PI, Math.E

Math also has a zillion helpful functions in JavaScript.

Math.abs(value); //absolute value
Math.max(value1, value2); //find the largest
Math.random() //generate a decimal number between 0 and 1
Math.floor(Math.random()*101) //generate a decimal number between 0 and 100
Submitted by: Administrator

Read Online JavaScript Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.