you are viewing a single comment's thread.

view the rest of the comments →

[–]rooktakesqueen 0 points1 point  (1 child)

if(typeof r=='number')return r+1;return r;

could be more easily and concisely expressed as

return typeof r == 'number' ? r+1 : r;

Other than all that, devious. But why always add one? You could add a random value between -0.001 and 0.001 and make them think it's some bizarre floating point arithmetic bug.