Functions & if/else


The function even though it is returning the string but an error message is displayed saying the function isn't returning the string check the comparison operator and the if/else syntax

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


The string returned should be an exact match, copy paste the string from the instructions


okkk... gotchaa...thankss :slight_smile:


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