16. More conditionals


#1

Does it mean if or something else?


#2

You mean this:

{

If you do thats like you can say what "Hugs" your objects and for loop, and while loop, and if else loop , and..... :laughing:

Basically it is a global syntax everyone has to follow. For example

if(age>13){
console.log("Teenager")
} 

while(age>13){
console.log("Grown up")
}

for(vari=0;i<3;i++){
console.log("I looped " + i + "Time")
}

#4

@c0d34ev3er, The "curve" brackets you're talking about, do you mean the curly braces " { } " or the parenthesis " ( ) ". There are also just regular brackets " [ ] " but those are used for arrays, don't worry about those right now.


#5

I tried your example then it says you need quotes around age and Lolman I mean the curly brackets


#6

It says that your if/else stamen don't log the condition is false console

and it looks like this:

// Remember, the order and punctuation matter.
// If you get an error, check carefully, line by line.
// If you're really stuck, click "Stuck? Get a hint!"
if (20 > 10)
{
console.log(true)
}
else (10 > 20)
{
console.log(false)
}


#7

yea because its logging true, since 20 is greater than 10. You should switch the false and true up, so it passes for you...


#8

I like how codecademy has this thing where you can see other peoples questions and see the answers. After all you might have the same problem! :grinning:


#9

i am also having a problem with this one any ideas... ive read all above.