18 Syntax unexpected token {


#1

I don't know what i've done wrong so please help

var rectangle = new Object();
rectangle.height = 3;
rectangle.width = 4;
// here is our method to set the height
rectangle.setHeight = function (newHeight) {
this.height = newHeight;
};
// help by finishing this method
rectangle.setWidth = funtion (newWidth) {
this.width = newWidth;
};
// here change the width to 8 and height to 6 using our new methods
rectangle.setWidth(8);
rectangle.setHeight(6);


#2

It looks like a typographical error on "rectangle.setWidth = function (newWidth)." If you "C" what I mean....


#3

I have no idea what your talking about it doesn't look wrong?


#4

nevermind i'm stupid


#5

you misspelled the word function.... you forgot the letter "c"