Why do i have to put an open curly brace after the if condition statement?


#1


Replace this line with your code. 
var sleepCheck= function(numHours) {
if (numHours>=8) {
return "You're getting plenty of sleep! Maybe even too much!";
}
 else {
    return "Get some more shut eye!";}
}
sleepCheck(10);
sleepCheck(5);
sleepCheck(8);


#2

you can read it here


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.