Help on Coding


Okay so I'm on Functions and Variables #12 (I'm a newbie guys seriously). I'm not sure on what's wrong with my code, but it says I have "unexpected identities". Does anyone know how to fix this? Okay yes, this question is kind of stupid. Ah well, at least I'm learning? :smile: Anyways, this is my function: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"!;

Yeah. I know... Help please!! Thank you!!


this line

function(numHours) {

should be

function sleepCheck(numHours) {


var sleepCheck = function(numHours){

and also this line

if numHours >== 8{

should be

if (numHours >= 8){

Lastly you have a little error here

return "Get some more shut eye"!;

should be

return "Get some more shut eye!"; //just moved the exclamation mark into the quotes


Thank you, random helpful genius whom I am indebted, you! Thank you!! :smile: Seriously though that was really helpful @rydan


Happy coding :smile: buddy