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.

Instagram ● Twitter ● Facebook

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

codedrops.tech

Top comments (0)