Samual Sam has Published 2310 Articles

TypedArray.reverse() function in JavaScript

Samual Sam

Samual Sam

Updated on 25-Jun-2020 13:17:39

74 Views

The reverse() function of the TypedArray object reverses the contents of a typed array.SyntaxIts Syntax is as followstypedArray.reverse()Example Live Demo    JavaScript Array every Method           var typedArray = new Int32Array([11, 5, 13, 4, 15, 3, 17, 2, 19, 8 ]);       ... Read More

TypedArray.BYTES_PER_ELEMENT property in JavaScript

Samual Sam

Samual Sam

Updated on 25-Jun-2020 13:17:09

121 Views

The BYTES_PER_ELEMENT property of the Typed Array represents the number of bytes in each element in it.SyntaxIts Syntax is as followsFloat32Array.BYTES_PER_ELEMENT;Example Live Demo    JavaScript Example           var sizeOfFloat64Array = Float32Array.BYTES_PER_ELEMENT;       document.write("Size of the float 32 array: "+sizeOfFloat64Array);       ... Read More

TypedArray.buffer property in JavaScript

Samual Sam

Samual Sam

Updated on 25-Jun-2020 13:16:09

76 Views

The buffer property of the TypedArray represents the ArrayBuffer of the current TypedArray.SyntaxIts Syntax is as followsobj.buffer;Example Live Demo    JavaScript Example           var buffer = new ArrayBuffer(156);       var float32 = new Float32Array(buffer);       document.write(float32.buffer.byteLength);     Output156

TypedArray.byteOffset property in JavaScript

Samual Sam

Samual Sam

Updated on 25-Jun-2020 13:15:23

79 Views

The byteOffset property of the TypedArray represents the offset of the current object.SyntaxIts Syntax is as followstypedArray.byteOffset();Example Live Demo    JavaScript Example           var buffer = new ArrayBuffer(156);       var float32 = new Float32Array(buffer);       document.write(float32.byteOffset);     Output0

TypedArray.entries() function in JavaScript

Samual Sam

Samual Sam

Updated on 25-Jun-2020 13:14:17

66 Views

The entries() function of TypedArray returns an iterator of the corresponding TypedArray object and using this, you can retrieve the key-value pairs of it. Where it returns the index of the array and the element in that particular index.SyntaxIts Syntax is as followstypedArray.entries()Example Live Demo    JavaScript Example ... Read More

TypedArray.fill() function in JavaScript

Samual Sam

Samual Sam

Updated on 25-Jun-2020 13:09:24

102 Views

The fill() function of the TypedArray object replaces all the required/desired elements of the array with specifies value (fixed). This function accepts three numbers one representing a fixed value and the other two represents the start and end indexes of the portion of the elements to be replaced (end value ... Read More

isNAN() function in JavaScript

Samual Sam

Samual Sam

Updated on 25-Jun-2020 13:08:12

501 Views

The isNaN() function accepts a value and determines whether the given value is a number or not.If so, this method returns true else it returns false. You can also call this method using Number object.SyntaxIts Syntax is as followsisNAN(5655);Example Live Demo    JavaScript Example         ... Read More

eval() function in JavaScript

Samual Sam

Samual Sam

Updated on 25-Jun-2020 13:06:30

364 Views

The eval() function accepts a string value which holds JavaScript code. This function executes the given code and returns the result of the code.SyntaxIts Syntax is as followseval(32*45);Example Live Demo    JavaScript Example           document.write(eval(32*45));       document.write("");       document.write(eval(new String("Hello ... Read More

encodeURI() function in JavaScript

Samual Sam

Samual Sam

Updated on 25-Jun-2020 13:05:23

123 Views

The encodeURI() function accepts a string value representing an URI and encodes it by replacing the characters in it using numbers (1 to 4) and escape sequence.SyntaxIts Syntax is as followsencodeURIComponent('http://www.qries.com/');Example Live Demo    JavaScript Example           var result1 = encodeURI('http://www.qries.com/?x=шеллы');       ... Read More

decodeURI() function in JavaScript

Samual Sam

Samual Sam

Updated on 25-Jun-2020 13:04:20

102 Views

The decodeURI() function accepts a string value representing an encoded URI, decodesit and, returns the resultant string.SyntaxIts Syntax is as followsdecodeURI('http://www.qries.com/');Example    JavaScript Example           var result1 = decodeURI('http://www.qries.com/');       document.write(result1);       document.write("");       var result2 = ... Read More

Advertisements