Possible error? (resolved)


// Write your function starting on line 3
var perimeterBox = function(length,width)
console.log(length + width + length + width);
console.olg sends back 18 which is correct, and it also sends back 4 for some reason. The error: It says "It looks like your perimeterBox function doesn't turn back the correct perimeter(4) for a length of 1 and a width of 1. It sends back 4, yet the error comes up! Why is this?


The 4 it sends back is quite weird. Does the code that you used correspond to the error message? Because the error says you logged (1,1) into the console

Regarding the error: the exercise is to 'return' the perimeter of the box and not to log it into the console so changing console.log to return should fix the error.


I put in console.log so I could see what it was thinking, I didn't think that would cause a problem in the code. It's fixed now.