← Back to challenges

Is the Number Less than or Equal to Zero?

JavaScriptMediumconditionsvalidationlanguage_fundamentals

Instructions

Create a function that takes a number as its only argument and returns true if it's less than or equal to zero, otherwise return false.

Examples

lessThanOrEqualToZero(5) ➞ false

lessThanOrEqualToZero(0) ➞ true

lessThanOrEqualToZero(-2) ➞ true
javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.