Created
November 23, 2010 12:22
-
-
Save mrspeaker/711667 to your computer and use it in GitHub Desktop.
JavaScript typed array on iOS 4.2.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" charset="utf-8"> | |
var buffer = new ArrayBuffer( 16 ); | |
var int32View = new Int32Array( buffer ); | |
for ( var i = 0; i < int32View.length; i++ ) { | |
int32View[i] = i * 2; | |
} | |
alert( int32View[ 3 ] ); // Alerts 6 in 4.2.1 | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment