TypedArray对象的name属性以字符串(格式)表示类型化数组的名称,即Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array之一。
其语法如下
Float32Array.name;
<html> <head> <title>JavaScript Example</title> </head> <body> <script type="text/javascript"> var nameOfarray1 = Float32Array.name; document.write("name of array1: "+nameOfarray1); document.write("<br>"); var nameOfarray2 = Int16Array.name; document.write("name of array2: "+nameOfarray2); </script> </body> </html>
输出结果
name of array1: Float32Array name of array2: Int16Array