| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Float64Array | [Back] [Original] |
Get to know MDN better
new Float64Array(length); new Float64Array(typedArray); new Float64Array(object); new Float64Array(buffer [, byteOffset [, length]]);
Float64Array.BYTES_PER_ELEMENT Float64Array 8
Float64Array.prototypeTypedArray
Float64Array.from() Float64Array Array.from()
Float64Array.of() Float64Array Array.of()
Float64Array.prototype.constructor Float64Array
Float64Array.prototype.buffer Float64Array ArrayBuffer
Float64Array.prototype.byteLength Float64Array ArrayBuffer ()
Float64Array.prototype.byteOffset Float64Array ArrayBuffer ()
Float64Array.prototype.length Float64Array
// From a length
var float64 = new Float64Array(2);
float64[0] = 42;
console.log(float64[0]); // 42
console.log(float64.length); // 2
console.log(float64.BYTES_PER_ELEMENT); // 8
// From an array
var arr = new Float64Array([21, 31]);
console.log(arr[1]); // 31
// From another TypedArray
var x = new Float64Array([21, 31]);
var y = new Float64Array(x);
console.log(y[0]); // 21
// From an ArrayBuffer
var buffer = new ArrayBuffer(32);
var z = new Float64Array(buffer, 0, 4);
| ECMAScript 2027 LanguageSpecification # sec-typedarray-objects |
ECMAScript 2015 (ES6) Float32Array new Float32Array new TypeError
var dv = Float64Array([1, 2, 3]);
// TypeError: calling a builtin Float64Array constructor
// new
var dv = new Float64Array([1, 2, 3]);
Float64ArrayTypedArrayat()TypedArray.prototype.copyWithin()TypedArray.prototype.entries()TypedArray.prototype.every()TypedArray.prototype.fill()TypedArray.prototype.filter()TypedArray.prototype.find()TypedArray.prototype.findIndex()findLast()findLastIndex()TypedArray.prototype.forEach()TypedArray.prototype.includes()TypedArray.prototype.indexOf()TypedArray.prototype.join()TypedArray.prototype.keys()TypedArray.prototype.lastIndexOf()TypedArray.prototype.map()TypedArray.prototype.reduce()TypedArray.prototype.reduceRight()TypedArray.prototype.reverse()set()slice()TypedArray.prototype.some()TypedArray.prototype.sort()TypedArray.prototype.subarray()TypedArray.prototype.toLocaleString()toReversed()TypedArray.prototype.toSorted()toString()TypedArray.prototype.values()TypedArray.prototype.with()TypedArray.prototype[Symbol.iterator]()Object/FunctionObject.prototype.__defineGetter__()Object.prototype.__defineSetter__()Object.prototype.__lookupGetter__()Object.prototype.__lookupSetter__()Object.prototype.hasOwnProperty()Object.prototype.isPrototypeOf()Object.prototype.propertyIsEnumerable()Object.prototype.toLocaleString()Object.prototype.toString()Object.prototype.valueOf()BigInt64ArrayBigUint64ArrayFloat16ArrayFloat32ArrayInt8ArrayInt16ArrayInt32ArrayUint8ArrayUint8ClampedArrayUint16ArrayUint32Array| Web Proxy Viewer | New URL | Original Page |