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 for daily posts.


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

Top comments (0)