I was asked this question recently. Took me a little bit to figure it out, but here it is.

var _theString = 'Hello World!';

alert(_theString.split('').map(function(c) { return c.charCodeAt(); }));