Why does this return NaN?

Hi, I have a undefined object at the top of my page.

var paddelY = {};

Then IN the draw loop I define it (Otherwise I get an error that mouseY is undefined):

paddelY = { 
1 : mouseY + height*0.03,  //Number
2 : this[1] - height*0.00275 //NaN
};

however if I were to log paddelY[2] to the console it would be NaN. Please help!

Answers

Sign In or Register to comment.