DEV Community

Mehul Lakhanpal
Mehul Lakhanpal

Posted on

Output of 'Math.max() < Math.min()' ?

console.log(Math.max() < Math.min()); // true
Enter fullscreen mode Exit fullscreen mode

The default value for Math.max() is -Infinity &
the default value for Math.min() is Infinity

Hence, -Infinity < Infinity => true


Thanks for reading 💙

Follow @codedrops.tech for daily posts.

InstagramTwitterFacebook

Micro-Learning ● Web Development ● Javascript ● MERN stack ● Javascript

codedrops.tech

Top comments (0)