this works as expected
[97,98].map(function(x){String.fromCharCode(x)}) // [ \'a\', \'b\' ]
but the output is following line is unexpected<
a2 = [97,98].map(function(x){return String.fromCharCode(x)}); alert(a2); a2 = [97,98].map(String.fromCharCode); alert(a2);
both alert "a,b" for Firefox13 on Linux. the first function was missing a return statement.