Added missing return

Changed 

double = function (n) { n + n; };

to

double = function (n) { return n + n; };