There is a awkward problem with my short code


The question is that the console tells me that there is a problem with the else part. If I try to do without else statement it tells that is right and I can pass to next season but when I put the else statement it tells me that there is a problem with the else's syntax.
If someone could tell me where is the problem I would appreciate it so much.
Thank you.
I let you here the short code.
var perimeterBox = function(length, width) {
return length * 2 + width * 2;
if (perimeterBox(2, 3) <= 10) {
console.log("You have already got a new desk");
else {
console.log("Keep looking for a new one");
Thank you so much!!!


if (condition) {
    // do something 
} else {
    // do other Thing

Do you see after the closing bracet from the if statement there is a semicolon. Remove it an it should work.


Ok, thank you so much @codmakr I appreciate it.
Thank you and thank Codecademy for this insane tool to learn.


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