You don't need the semicolon for the if and else statements. Code: if (40 > 39) { console.log("I am right"); } else (40 < 39) { console.log("I am wrong"); }
Don't put your variable names in double quotes when you call them in a function. You only want the first 3 letters so it would be .substring(0-2) , this is because the first letter in the string is actually "0" second is "1" etc.
When something is in "", then it is considered a string. It should just be myCountry. Code: var myCounty = ("United States") console.log(myCountry.length); console.log(myCountry.substring(0-2));
Code: var myCountry = ("United States") console.log(myCountry.length); console.log(myCountry.substring(0,3)); This wound up being the correct code, but thank you!
You're welcome. Also if you get stuck just go to the Q&A Forum for that section. It's in the bottom left hand corner. You can usually find the solutions to most of the problems there. If you are like me you probably understand the lesson better by seeing the completed code first and then breaking it down in your head to understand what each part does.
Yes that's actually correct. Sorry I always forget substring actually uses the last number as the "cut-off" position.
Again, no semicolons after if or else. Code: if (feedback > 8) { console.log("Yay!"); } else { console.log("Nay!"); }