Karthikeya Boyini has Published 2383 Articles

TypedArray.filter() function in JavaScript

karthikeya Boyini

karthikeya Boyini

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

30 Views

The filter() function of TypedArray accepts a string value representing the name of a function, tests whether all the elements in an array passes the test implemented by the provided function, creates a new array with all elements that pass the test.SyntaxIts Syntax is as followstypedArray.filter(function_name)Example Live Demo    JavaScript ... Read More

isFinite() function in JavaScript

karthikeya Boyini

karthikeya Boyini

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

37 Views

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

encodeURIComponent() function in JavaScript

karthikeya Boyini

karthikeya Boyini

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

54 Views

The encodeURIComponent() 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 = encodeURIComponent('http://www.qries.com/');       ... Read More

decodeURIComponent() function in JavaScript

karthikeya Boyini

karthikeya Boyini

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

160 Views

The decodeURIComponent() function accepts a string value representing an encoded URI (Uniform Resource Identifier) decodes it and returns the result.SyntaxIts Syntax is as followsencodeURIComponent('http://www.qries.com/');Example Live Demo    JavaScript Example           var encodedData = encodeURIComponent('http://www.qries.com/?x=шеллы');       document.write("Encoded Data: "+encodedData);       document.write(""); ... Read More

Check if a String is not empty ("") and not null in Java

karthikeya Boyini

karthikeya Boyini

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

2K+ Views

Let’s say we have the following string −String myStr1 = "Jack Sparrow";Let us check the string now whether it is not null or not empty.if(myStr != null || myStr.length() != 0) { System.out.println("String is not null or not empty");Example Live Demopublic class Demo {    public static void main(String[] args) { ... Read More

Set.has() function in JavaScript

karthikeya Boyini

karthikeya Boyini

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

176 Views

The has() function of the Set accepts a value and verifies whether the current object contains the specified value. If so, this function returns the boolean value true else, it returns false.SyntaxIts Syntax is as followssetObj.has()Example Live Demo    JavaScript Example           const setObj ... Read More

parseFloat() function in JavaScript

karthikeya Boyini

karthikeya Boyini

Updated on 25-Jun-2020 12:55:38

84 Views

The parseFloat() function accepts two parameters one is a string representing a number and another is a number representing the radix and returns an integer of the given radix.SyntaxIts Syntax is as followsnum.parseFloat('4524', 8);Example Live Demo    JavaScript Example           var result1 = parseFloat(Math.PI); ... Read More

Set.size Property in JavaScript

karthikeya Boyini

karthikeya Boyini

Updated on 25-Jun-2020 12:54:46

314 Views

The size property of the Set object returns number representing the number of elements in the current set object.SyntaxIts Syntax is as followsObj.size();Example Live Demo    JavaScript Example           const setObj = new Set();       setObj.add('Java');       setObj.add('JavaFX');     ... Read More

Set.clear() function in JavaScript

karthikeya Boyini

karthikeya Boyini

Updated on 25-Jun-2020 12:52:59

455 Views

The clear() function of the Set object removes all elements from the current Set object.SyntaxIts Syntax is as followssetObj.clear()Example Live Demo    JavaScript Example           const setObj = new Set();       setObj.add('Java');       setObj.add('JavaFX');       setObj.add('JavaScript');     ... Read More

Set.entries() function in JavaScript

karthikeya Boyini

karthikeya Boyini

Updated on 25-Jun-2020 12:50:45

98 Views

The entries() function of the Set returns an iterator object which holds the contents of the current Set. This iterator object returns a pair of values for each entry just like map (key and value). But here, instead of both key and value it returns the element of the set ... Read More

Advertisements