Too humid
EasyErrors3 min
A factory sensor measures humidity in percent. Write a function checkHumidity(percent). If the humidity is above 70, throw an Error with any message. If the humidity is fine, the function returns nothing.
Examples
checkHumidity(45)Returns undefined
checkHumidity(70)Returns undefined
Loading the editor...
- Input
checkHumidity(80)ExpectedThrows Error - Input
checkHumidity(45) - Input
checkHumidity(70)
Hidden tests run on Submit