Samual Sam has Published 2492 Articles

TypedArray.buffer property in JavaScript

Samual Sam

Samual Sam

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

40 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

34 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

41 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

58 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

389 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

Java program to reverse each word in a sentence

Samual Sam

Samual Sam

Updated on 25-Jun-2020 13:07:03

860 Views

Each word in a sentence can be reversed and the sentence displayed with the words in the same order as before. An example of this is given as follows −Original sentence = an apple is red Modified sentence = na elppa si derA program that demonstrates this is given as ... Read More

eval() function in JavaScript

Samual Sam

Samual Sam

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

244 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

95 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

69 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

Java program to check whether a given string is Heterogram or not

Samual Sam

Samual Sam

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

337 Views

A string is a Heterogram if no letter of the alphabet occurs more than once in it. An example of this is given as follows −String = the big dwarf only jumpsThis string is a Heterogram as each alphabet in the string occurred only once.A program that demonstrates this is ... Read More

Advertisements