Getting started with programming Conclusion lesson 28/28 part 2


Hi! I am currently stuck on lesson 28 out of 28 on JS path.
Here is the code that I am using that does not seem to work. What should I do correctly to complete the course?

// Not sure where to begin? Check the Hint!
if ("exercise" < 28)
console.log("I have finished first course!");


try that if ("exercise".length < 28)


Thank you!

I tried that and now my line 4 of code works, but my final line which has the sentence, "I completed my first course!" does not work.
Earlier, my last line worked, but the line 4 didn't; Now they are switched!


try to put a small number at the place of 28 for exanple if ("exercise".length < 2)


Ok I did change it to a smaller number, but now its the same issue as before: The final line of code works, but line 4 does not show up.


Only one should show up. Becaus of the if condition
"exercise".length == 8
So the if statement look like this..
If (8 <2 ){
Run this code
else {
OtherWise this one
In this case it will runner the second console.log because the condition are false


Ah! Thank you!

However, I still can't move onto to complete the lessons.
Should I make the "if" statement true and then make the other statement false?


the only thing the lesson aske you to do is to print this sentence
("I finished my first course!") so it should be like that.

if ("exercise".length < 28)
console.log("I finished my first course!");
console.log("try again!");


Thank you so much!


Yeah I tried to get fancy and made a variable myName and gave it a defined length and made if/else after and it kept giving me an error. Did simple like @wizmarco said and it worked Thanks!!!