Javatpoint Logo
Javatpoint Logo

JavaScript DataView.getInt32() method

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

NOTE: Range of 32-bit integer value is from 2,147,483,648 to 2,147,483,647 for signed integer value.

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 integer 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, the output will be an Integer
23

Example 2

Test it Now

Output:

If there is no data to be stored, Output will Be :
0

Example 3

Test it Now

Output:

Convert the PI value 3.14 to 3

3

Example 4

Test it Now

Output:

If we give an Integer value, Output will be Integer

7




Please Share

facebook twitter google plus pinterest