DEV Community

loading...
Cover image for JS Test #12: Math.min()

JS Test #12: Math.min()

Coderslang: Become a Software Engineer
Teaching you to code at js.coderslang.com - JavaScript, HTML, CSS, Node.js, React.js, React Native
Originally published at learn.coderslang.com on ・1 min read

js-test-12

How small is Math.min() in JavaScript?

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

The function Math.min() takes the variable number of arguments and returns the lowest number passed into it.

In our case, it’s called without any arguments which is a special case.

If Math.min() is called without any parameters, it will return Infinity which is the opposite of what you might have expected.


ANSWER: true will be printed to the screen as Infinity is greater than 0.

Discussion (0)