Javatpoint Logo
Javatpoint Logo

JavaScript DataView.getFloat32() method

The JavaScript DataView.getFloat32() is an inbuilt method in dataView. It is used to get a signed 32-bit float number at a specified location.

NOTE: Range of 32-bit floating point number is from -3.4+38 to +3.4E+38.

Syntax

Parameters

byteoffset: The offset, in a byte, from the start of the view where to read the data.

Return value

This method returns a signed 32-bit float number.

Browser Support

Chrome 9
Safari 5.1
Firefox 15
Opera 12.1

Example 1

Test it Now

Output:

If we give a Float value then output will be
3.0999999046325684

Example 2

Test it Now

Output:

if there is no data to be stored, then Output will Be:

NaN

Example 3

Test it Now

Output:

PI value will be
3.1415927410125732




Please Share

facebook twitter google plus pinterest