Function Error (CLOSED)


#1

Hi I'm getting the error SyntaxError: Expected ';' but I don't know were please help!

var perimeterBox = ( length , width ) {
    return length*2 + width*2 ;
};
perimeterBox = ( prompt("What is the length") , prompt("What is the width") );

#2

Hi this line

perimeterBox = ( prompt("What is the length") , prompt("What is the width") );

It's the call function so you should remove the = then here @nuclearotter

var perimeterBox = ( length , width )

it's missing the word function


#3

I tried that and it still doesn't work


#4

SyntaxError: Expected ';'


#5

I tried the function and it worked but it didn't print the right values


#6

I figured it out thx


#7

put this line in a console.log()

perimeterBox( prompt("What is the length") , prompt("What is the width") );