Javascript DataView getUint8()

Introduction

The Javascript DataView getUint8() method gets an unsigned 8-bit integer at the specified byte offset from the DataView.

dataview.getUint8(byteOffset)
  • byteOffset - the offset, in byte, from the start of the view.

Using the getUint8 method

var buffer = new ArrayBuffer(8);
var dataview = new DataView(buffer);
let a = dataview.getUint8(1); // 0
console.log(a);// www  .  j  av  a2s  .  co m



PreviousNext

Related