#28 Conclusion Part 2 - stuck!


#1

Hello :slight_smile:

I'm inputting this code:

if(10 % 2 === 0)
{
console.log=("I finished my first course!");
}
else {
console.log=("I didn't finish");
}

It's saying that I didn't log anything, although it is printing 'I finished my first course!' with no problem. I've tried refreshing the browser/resetting code, but still nothing. I also tried pasting correct code in from another feed with resetting etc. Any ideas?! :slight_smile:


#2

You're not calling the log function, you're assigning to that property of console.

Look up how to call a function and how to assign, note the difference and compare to your code.


#3

Thanks! I had a look around and came to this:
if(10 % 2 === 0)
{
console.log("I finished my first course!");
}
else {
console.log("I didn't finish");
}

However, it's still not working. Am I misunderstanding what it is telling me to do? Thanks for your help!


#4

Refresh your browser and it'll work like magic


#5

Ha! Thank you for your help! :slight_smile:


#6

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