Any help here would be great


#1

I'm not sure what is missing...

// Write your function starting on line 3

var perimterBox = function(length, length, width, width) {
return length + length + width + width;
console.log(val);
};
perimterBox(9,9,4,4);

Replace this line with your code.


#2

Hi this line

var perimterBox = function(length, length, width, width)

you should just have two parameter and not four

var perimterBox = function(length, length)

the same for your function call

perimterBox(9,4);

#3

Like this?

// Write your function starting on line 3

var perimterBox = function(length, length) {
return length + length ;
};
perimterBox(9,4);

Still gives me an error...


#4

You've got 2 "length" 's in there what about the width!

var perimeterBox = function(length, width) {

}

Then there are two ways you can return the result either through addition or addition and multiplication.

Also you've spelt perimeter wrong when declaring the function :slight_smile:


#5

Benjnev thanks very much makes sense now...


#6

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