Help with 28. part two


var myVar = 7
if(console.log (myVar > 3))
console.log("I finished my first course!");
console.log("I finished my first course!".length);

IS THIS RIGHT? not working


I don't know what this task is asking you to do, could you give me more details?


if(1 > 0) {
console.log('I finished my first course!');
} else {
console.log('I finished my first course!');

Try this and tell me if it works.


it worked. can you explain to me how that was done please?


The instructions weren't strict so you could put probably any condition that evaluates to true or false and it would work.

It basically asked you to create your own condition, whatever condition you like and just log I finished my first course! to the console.

Can you tell me exactly what you don't understand in my code or you are not comfortable with fundamental parts of if/else statement?


or explain what i did wrong in my code. i wasnt suppose to use var?


You could have used whatever you want. You can put variables in your conditions or plain simple values.

but don't put console.log in if statements because this method is used to get information about values, variables and such.

If your if statement would be if(myVar > 3) it would also work.


ok thank you so much!!! no i know what to do next time


I'm glad it helped, always try to analyze your code if you get something unexpected. If you don't know if condition will be true or false you can always test it using console.log(); and put whatever condition you like in that method before executing if statement, so you know what part of code will be executed.