9. Functions with two parameters


Hey, i've just started coding and i'm stuck at 9, functions with two parameters.
I don't really see where i've gone wrong, could any of you help me?

// Write your function starting on line 3

var perimeterBox = function(lenth, width)
return length + length + width + width;

I keep getting this response : Oops, try again. It looks like your perimeterBox function doesn't return the correct perimeter (4) for a width of 1 and a length of 1.

What am I doing wrong?


You accidentally spelled "length" wrong! :slight_smile:


oh! thank you! I should have noticed that, i feel dumb :confounded:


var perimeterBox = function (length,width)
return length + length + width + width;


Where did I go wrong?
var perimeterBox = function(width, length) {
return length + length + width + width;
var perimeterBox(7,24);


Hi this line

var perimeterBox(7,24);

remove the var.