12. Funtions & if/else: How the heck do I do this!?!?



SyntaxError: missing ) after argument list

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!";


will someone help me before I explode!!!




check how many parentheses there are


That's exaclty what I have...


I sent you a message


see if any of your friends can find anything


I figured it out

var sleepCheck = function(numHours)
if (numHours >= 8)
return ("You're getting plenty of sleep! Maybe even too much!");
return ("Get some more shut eye!");


yes, i show where the problem is and then below i explain what is wrong:

if you then look at your parentheses, you see you have 2x ( and 1x )


okay, I just figured it out


By working around the problem, yes


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