JavaScript Function apply()

The JavaScript Function apply() method calls a function containing this value and a single array of arguments. Syntax: function.apply(thisArg, array) Parameters: thisArg: It is used as this keyword for the call to a function. It is an optional parameter. array: It represents an array-like object. Return: Result of the invoking function. Example: <!DOCTYPE html> <html> … Read more

JavaScript DataView.getUint32()

The JavaScript DataView.getUint32() method inserts an unsigned 32-bit integer number at a specified location. Syntax: dataview.getUint32(byteOffset) Parameters: byteoffset: It represents the offset (in byte) from the start of the data view. Return: The unsigned integer number of 32-bit. Example: <!DOCTYPE html> <html> <body> <script> var dv = new ArrayBuffer(8); var a = new DataView(dv); a.setUint32(1,65468565.98); … Read more

JavaScript DataView.getUint16()

The JavaScript DataView.getUint16() method inserts an unsigned 16-bit integer number at a specified location. Syntax: dataview.getUint16(byteOffset) Parameters: byteoffset: It represents the offset (in byte) from the start of the data view. Return: The unsigned integer number of 16-bit. Example: <!DOCTYPE html> <html> <body> <script> var dv = new ArrayBuffer(8); var a = new DataView(dv); a.setUint16(1,6545.98); … Read more

JavaScript DataView.getUint8()

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: The 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); … Read more

JavaScript DataView.getInt32()

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 … Read more

JavaScript DataView.getInt16()

The JavaScript DataView.getInt16() method inserts a signed 16-bit integer number at a specified location. Range of for unsigned 16-bit integer number: 0 to 65,535 Range of for signed 16-bit integer number: 32,768 to 32,767 Syntax: dataview.getInt16(byteOffset) Parameters: byteoffset: It represents the offset (in byte) from the start of the data view. Return: An integer number … Read more

JavaScript DataView.getInt8()

The JavaScript DataView.getInt8() method inserts a signed 8-bit integer number at a specified location. Syntax: dataview.getInt8(byteOffset) Parameters: byteoffset: It represents the offset (in bytes) from the start of the data view. Return: An integer number of 8-bit. Example: <!DOCTYPE html> <html> <body> <script> var dv = new ArrayBuffer(8); var a = new DataView(dv); a.setInt8(1,56.99); document.write(a.getInt8(1)); … Read more

JavaScript DataView.getFloat64()

The JavaScript DataView.getFloat64() inserts a signed 64-bit float number at a specified location. Range of 64-bit float number: -1.7+308 to +1.7E+308 Syntax: dataview.getFloat64 (byteOffset) Parameters: byteoffset: It represents the offset (in bytes) from the start of the data view. Return: Signed float number of 64-bit. Example: <!DOCTYPE html> <html> <body> <script> var dv = new … Read more

JavaScript DataView.getFloat32()

The JavaScript DataView.getFloat32() inserts a signed 32-bit float number at a specified location. Range of 32-bit float number: -3.4+38 to +3.4E+38 Syntax: dataview.getFloat32 (byteOffset) Parameters: byteoffset: It represents the offset (in bytes) from the start of the data view. Return: Signed float number of 32-bit. Example: <!DOCTYPE html> <html> <body> <script> var dv = new … Read more

JavaScript DataView

In Javascript, a low-level interface for reading and writing multiple number types is facilitated with the help of DateView in an ArrayBuffer. JavaScript DataView Methods: getFloat32() Method: Use: To get a 32-bit float number at a specified location. getFloat64() Method: Use: To get a 64-bit float number at a specified location. getInt16() Method: Use: To … Read more