[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/DataView/getFloat64 [Back]  [Original]

DataView.prototype.getFloat64() - JavaScript | MDN

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

DataView.prototype.getFloat64()

Baseline Widely available

This feature is well established and works across many devices and browser versions. Its been available across browsers since 2015 7.

DataView getFloat64() DataView 8 64 . , .

In this article

// Create an ArrayBuffer with a size in bytes
const buffer = new ArrayBuffer(16);

const view = new DataView(buffer);
view.setFloat64(1, Math.PI);

console.log(view.getFloat64(1));
// Expected output: 3.141592653589793

js
getFloat64(byteOffset)
getFloat64(byteOffset, littleEndian)

byteOffset

( ).

littleEndian Optional

. false undefined .

.

RangeError

byteOffset .

getFloat64()

js
const { buffer } = new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
const dataview = new DataView(buffer);
console.log(dataview.getFloat64(1)); // 8.20788039913184e-304

Specification
ECMAScript 2027 LanguageSpecification
# sec-dataview.prototype.getfloat64


Web Proxy Viewer  |  New URL  |  Original Page