JavaScript Math Object

Full Stack Web Development Courses with Real-time projects Start Now!!

Program 1

// let n=Math.max(50,12,56,78)
// console.log(n)
// let n=Math.min(50,12,56,78)
// console.log(n)
// n  p ----> n to power p
//console.log(Math.pow(5,3))

// "use strict"
// const ps=require("prompt-sync")
// const prompt=ps({sigint:true})
// let n=parseInt(prompt("Enter a Number"))
// let p=parseInt(prompt("Enter Power"))

// console.log(Math.pow(n,p))
// function displayRandom(high,low)
// {
//     console.log(Math.floor(Math.random()*high-low+high))
// }
// displayRandom(10,5)

// "use strict"
// const ps=require("prompt-sync")
// const prompt=ps({sigint:true})
// let n=parseInt(prompt("Enter a Number"))
// console.log(Math.exp(n))
//console.log(Math.sin(45))
//console.log(Math.floor(Math.sqrt(125)))
console.log(Number.MAX_SAFE_INTEGER)

 

Your opinion matters
Please write your valuable feedback about DataFlair on Google

courses

TechVidvan Team

TechVidvan Team provides high-quality content & courses on AI, ML, Data Science, Data Engineering, Data Analytics, programming, Python, DSA, Android, Flutter, full stack web dev, MERN, and many latest technology.

Leave a Reply

Your email address will not be published. Required fields are marked *