The following script prints undefined to the console for each character in the string, but works correctly in Chrome.
<script>
function main()
{
var x = "hello world";
for ( var i = 0; i < x.length; ++i ) {
console.log( x[i] );
}
}
main();
</script>
Do I have to do something to the array in order to get this to work properly in all browsers?