28/28 "Oops, try again. It looks like you didn't log anything!"


#1

What did i do wrong guys

if ( 1*20 === 20 )
{
console.log = "I finished my first course!";
}
else
{
console.log = "No I didn't do anything";
}

It shows "I finished my first course!" on screen but i get an error "Oops, try again. It looks like you didn't log anything!"


#2

The log needs to be in the format: console.log(" ");


#3

@thecityofrome

I've tried that and now I get this error message

"Oops, try again. Your code doesn't look quite right. Check the Hint if you need help!"

Here is the updated script that I have inserted

if ( 1*20 === 20 )
{
console.log("I finished my first course!");
}
else
{
console.log("No I didn't do anything");
}


#4

I copied your code into the exercise and it passed no problem. Possibly try a different browser?


#5

@thecityofrome

What.... It works now. ( After I opened an incognito window and login into the tutorial again ). Gosh I spent the whole morning trying to figure this out....

Thank you so much for the help!


#6

Your welcome @zerocomrade ! Community is powerful.


#7

With console.log = ... you overwrite the console.log method so it is no longer able to show stuff on the screen and by refreshing (or in this case opening a new window) you reset the JS.


#8

@haxor789

Thanks. I'll take note of that.