JavaScript DataView.getUint8() method

The JavaScript DataView.getUint8() method inserts an unsigned 8-bit integer number at a specified location.

Syntax:

dataview.getUint8(byteOffset)

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

Return:
Unsigned integer number of 8-bit.

Example:

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

Output:

65
Please Share