9/13


#1

var perimeterBox=function(length, width) {return length+length+width+width;};
perimeterBox=(1,1)
It keeps telling me I haven't defined the function when I'm sure I did. Idk, maybe I'm doing something wrong. Help?


#2

This line should be a function call rather than an assignment:

perimeterBox=(1,1)

The above is overwriting the function with an unexpected list expression that JavaScript doesn't recognize in this setting..

perimeterBox(1,1);

is the call expression needed to run the function.


#4

Okay. So I did what you said to fix it
var perimeterBox=function(length, width) {return length+length+width+width;};

perimeterBox=(1,1);
But it still gives me the error message
Oops, try again. Did you define a perimeterBox function?
Am I doing something wrong or is there a bug in the system?


#5

You need to call the function,

perimeterBox(1,1)

#6

Ah. Thank you that helped ^^