JavaScript DataView.getInt32() method

The JavaScript DataView.getInt32() method inserts a signed 32-bit integer number at a specified location.

Range of for signed 32 bit integer number:

2,147,483,648 to 2,147,483,647

Syntax:

dataview.getInt32(byteOffset)

Parameters:
byteoffset: It represents the offset (in byte) from the start of the data view.

Return:
Signed Integer number of 32-bit.

Example:

<!DOCTYPE html>
<html>
<body>
<script>   
var dv = new ArrayBuffer(8);	 
var a = new DataView(dv); 	 
a.setInt32(1,65786789.9998);  
document.write(a.getInt32(1));    
</script>  
</body>
</html>

Output:

65786789
Please Share