28. Conclusion Part 2, what am i doing wrong?


what i did:

if( 15 > 10 )
{ "I finished my first course!" }
else { "I suck at coding!" }

the log gives me "I finished my first course!"
but instead of saying move on to next lesson it says "oops, try again! Look like you didn't log anything!"
what am I doing wrong?


did you try...

++++ reset of session *****************
under certain circumstances you can shoot your Browser in an
inconsistent state.

Therefor it is of an advantage to know that you have 2 reset facilities:

One is the use of the F5-key which does a refresh Browser


Two, select&copy your code
Then use the Reset Code button of the course-window,
then paste your code back in.

General Notes:
Always refresh the browser after making corrections:
CTRL f5 ( if on Windows or Linux)
CMD r ( if on a MAC).
CTRL 0 to reset browser zoom


thanks for the reply!

I tried resetting both ways and its still giving me the "Oops!" message :frowning:

also tried:

var myAge = "19";
if ( myAge > 2 ) {
"I finished my course!" }
else {
"I suck at coding!" }

from a blank log, it again gave me the 'true' result but I again get the error message. Don't know what's going on ...


instead of

if (myAge> 2) {"I finished my course!"}


 else { "I suck at coding" }


if (myAge > 2) { console.log("I finished my course!")


else { console.log("I suck at coding")

in other words, you are forgetting your console.logs.
the reason why the console is printing true is because what you typed is true but it doesn't recognize your strings because there is no console.log :grinning:


maybe if included the console.log()-method

console.log("I finished my course!");


console.log("I suck at coding!");


Yes that was the problem! The console.log made it work!
Okay yeah that makes sense, thanks for all your help :smile:


I'm getting this same error but even if I try the fixes listed here it still isn't working. Any suggestions?


Please display the code you are currently using...


Please help :frowning:

var myName="Chanel";
if ("myName".length>2) {
console.log("I finished my course!");
else {
console.log("I am here forever");



As soon as you have assigned a VALUE to a variable name
like in

var myName = "Chanel";

you will be able to use this variable-name
in your code
and the Javascript Interpreter will evaluate the variable-name into the associated VALUE.

Thus you could have used

if ( myName.length > 2 ) {
     console.log("I finished my course!");
} else {
 console.log("I am here forever");


var myName=dany
{console.log("i finished my first course");



I'm not sure if "VAR (add a var at the beginning to define it) dany = 4" has to be in front of "var myName = dany".

Also, it should be "CONSOLE.LOG("nop");".


I copy your answer, but it's still wrong


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.