Writing Functions in JS


Hi, guys! I finally got passed that coding exercise I kept posting about but am now stuck at something else:

// Write your function below. 
// Don't forget to call your function!
var sleepCheck = function(numHours) {
    if (numHours >8)
    return "You're getting plenty of sleep! Maybe even too much!";
 ---> whenever I remove this bracket another error message pops up} else {
    return "Get some more shut eye!";



if (numHours >8) // missing {

see comment in code


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