JavaScript dataView.getInt8() Method Last Updated : 11 Jul, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report The dataView.getInt8() is a method in dataView which is used to get an 8-bit integer in the byte at the specified location from the start of the dataView. Syntax: dataview.getInt8(byteOffset) Parameters: It has the parameter byteOffset which is offset in a byte and it says from the start of the view where to read the data. Return value: It returns 8-bit signed integer value. Below are examples of the dataView.getInt8()() Method. Example 1: javascript var buffer = new ArrayBuffer(16); var dataview1 = new DataView(buffer, 0, 4); dataview1.setInt8(0, 12); console.log(dataview1.getInt8(0)); Output: 12 Example 2: JavaScript dataview1.setInt8(0, 123); console.log(dataview1.getInt8(0)); Output: 123 Example 3: JavaScript dataview.setInt8(3, 45); console.log(dataview.getInt8(3)); Output: 45 Example 4: javascript // Create buffer var buffer = new ArrayBuffer(16); // Create one view var dataview1 = new DataView(buffer, 0, 4); // put the data at slot 0 dataview1.setInt8(0, 123); console.log(dataview1.getInt8(0) + "<br>"); // create another view var dataview2 = new DataView(buffer, 1, 2); // put data at slot 1 dataview2.setInt8(1, 45); console.log(dataview2.getInt8(1)); Output: 123 45 Example 5: JavaScript // Create buffer var buffer = new ArrayBuffer(16); var dataview = new DataView(buffer, 0, 10); // put data at slots dataview.setInt8(0, 12); dataview.setInt8(1, 23); dataview.setInt8(2, 34); dataview.setInt8(3, 45); dataview.setInt8(4, 67); dataview.setInt8(5, 78); dataview.setInt8(6, 89); dataview.setInt8(7, 90); dataview.setInt8(8, 123); // print the value using getInt8 method that // prints the first 8 int console.log(dataview.getInt8(0); console.log(dataview.getInt8(1); console.log(dataview.getInt8(2); console.log(dataview.getInt8(3); console.log(dataview.getInt8(4); console.log(dataview.getInt8(5); console.log(dataview.getInt8(6); console.log(dataview.getInt8(7); console.log(dataview.getInt8(8)); Output: 12 23 34 45 67 78 89 90 123 We have a complete list of Javascript Date Objects, to check those please go through this JavaScript dataView Complete Reference article. Supported Browsers: Google Chrome 9 and aboveEdge 12 and aboveFirefox 15 and aboveInternet Explorer 10 and aboveOpera 12.1 and aboveSafari 5.1 and above We have a Cheat Sheet on Javascript where we covered all the important topics of Javascript to check those please go through Javascript Cheat Sheet-A Basic guide to JavaScript. Comment More infoAdvertise with us Next Article JavaScript dataView.getUint32() Method V vidhyachaudhary Follow Improve Article Tags : JavaScript Web Technologies Similar Reads JavaScript dataView.getUint8() Method The dataView.getUint8() is an inbuilt function in dataView that is used to get an unsigned 8-bit integer at the specified location i.e, at byte offset from the start of the dataView. Syntax: dataView.getUint8(byteOffset) Parameters: It has the parameter byteOffset which is offset in a byte and it sa 2 min read JavaScript dataView.getInt16() Method The Javascript dataView.getInt16() is an inbuilt function in dataView that is used to get a 16-bit integer at the specified location i.e, at byte offset from the start of the dataView. The range of 16-bit integer values is from 0 and 65,535 for unsigned and from ?32,768 to 32,767 for signed integer 2 min read JavaScript dataView.getInt32() Method The dataView.getInt32() is an inbuilt function in dataView that is used to get a 32-bit integer at the specified location i.e, at byte offset from the start of the dataView. The range of 32-bit integer value is from 0 to 4,294,967,295 for unsigned and from 2,147,483,648 to 2,147,483,647 for the sign 2 min read JavaScript dataView.getUint16() Method The dataView.getUint16() is an inbuilt function in dataView that is used to get an unsigned 16-bit integer at the specified location i.e, at byte offset from the start of the dataView. Syntax: dataView.getUint16(byteOffset) Parameters: It has the parameter byteOffset which is offset in a byte and it 2 min read JavaScript dataView.getUint32() Method The dataView.getUint32() is an inbuilt function in dataView that is used to get an unsigned 32-bit integer at the specified location i.e, at byte offset from the start of the dataView. Syntax: dataView.getUint32(byteOffset) Parameters: It has the parameter byteOffset which is offset in byte i.e. fro 2 min read JavaScript dataView.getBigInt64() method This getBigInt64() method is used to get a signed 64-bit integer (long long) at the particular byte offset from the start of the DataView. Syntax: dataview.getBigInt64(byteOffset, value, littleEndian) Parameters: byteOffset: This parameter specifies the offset, in bytes, from the start of the view t 2 min read Like