#28 Conclusion: Part 2


The code worked so why is it giving me an error?


Your actually not wrong.. Its codecademy.. You just didnt output the right strings codecademy wanted for you in their instructions..

hint hint: you should change your if statements log, to the one it wants you to do in the instructions. You can just copy and paste it.


Where can I copy it from?


From the instruction or the error message :slightly_smiling:


I went back to #21 Modulo and if / else and copied and pasted the if / else statement they used and replaced it with the phrase they wanted me to use. But its still giving me the same error message...


Could you copy your code and paste it formatted like this:

The we could test it as I can't see any obvious errors. Also try to refresh the page and run it again, sometimes garbage is stuck in the exercise from previous tries or exercises and refreshing gets rid of those things as it reloads the JS.


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

Here you go


Ok all you need to do is to get rid of the just and add a "!" at the end. The syntax is fine.


Woooow, thanks. I totally misread it. Thank you for your help :slightly_smiling:


didnt work <3 but thanks for all the help <3


Like @haxor789 said, you needed to have a ! at the end of the correct statement:

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


Oops, try again. It looks like you didn't log the correct string to the console! Make sure to use exactly the string shown. that is what is shown when i do that


My bad, it should be:

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


thanks it worked i am sorta new to this and i forgot how to use console.log and make correct syntaxes lol, but thank you for the patience


It's fine. I'm here to help.


Same error as mila_dallas, "use exactly the string shown".
My code worked but gave me same error, although I successfully printed code:
I finished my first course
I finished my first course!
as if/true and else/false statements
reset code
refreshed page
Last resort, I cut and pasted from mila_dallas Success!


the problem is in the copy spelling instructions where it says "I finished my first course" is accented more


You were actually not supposed to put the "just" in your statement. That's why it was wrong.