Vineeth.mariserla has Published 140 Articles

How to get a number of vowels in a string in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 30-Jul-2019 22:30:26

Calculating number of vowels in a stringVowels in English language are a, e, i, o and u. Make sure that, in any string these vowels can be both cases ( either small or capital). DebriefThe following example, using a user defined function called 'noOfVowels()', reads an input string and compares that ... Read More

What is the use of Object.is() method in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 30-Jul-2019 22:30:26

Object.is()Object.is() is used to check whether two values are same or not. Two values are same when they have the following criteria. Either both the values are undefined or null .Either both are true or false.Both strings should be of same length, same characters and in same order.The polarities of both the values should be equal.Both ... Read More

Write the use of Array.reduceRight() method in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 30-Jul-2019 22:30:26

array.reduceRight()The array.reduceRight() is an inbuilt function in JavaScript which is used to convert elements of the given array from right to left to a single value.It accepts 2 parameters( current value and previous value ) from the given array and executes the operation.In the following example all the elements(group of ... Read More

What is the usage of Array.Every() method in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 30-Jul-2019 22:30:26

Array.Every()Array.Every() method checks whether all the elements in a given array passes the test implemented by the provided function(function given by user). It executes true when all the elements have passed the test and it executes false even one element in an array failed the test.In the following example every() ... Read More

What is Debouncing in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 30-Jul-2019 22:30:26

DebouncingDebouncing is nothing but reducing unnecessary time consuming computations so as to increase browser performance. There are some scenarios in which some functionalities take more time to execute a certain operation. For instance, take an example of a search bar in an e-commerce website.DebriefFor suppose a user wants to get "Tutorix study ... Read More

What is the use of proxy() object in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 30-Jul-2019 22:30:26

Proxy()One of the new features introduced by ECMAScript 6 is proxy() object. The Proxy() object is used to define custom behavior for fundamental operations (e.g. property lookup, assignment, enumeration, function invocation, etc).Proxy() object includes 3 key terms1) handler - It is a placeholder object which contains the traps.2) traps - Traps provide ... Read More

What is the use of Array.Some() method in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 30-Jul-2019 22:30:26

Array.some()Array.some() checks whether the given elements have passed the test implemented by the provided function(function given by user).Unlike Array.Every(), which returns true when all the elements passed the test, Array.some() will return true even one element in the array passed the test and returns false when every element failed the ... Read More

What is the use of Array.Find() method in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 30-Jul-2019 22:30:26

Array.find()Array.find() is used to return value of first element in the array that satisfies provided testing condition(user given condition).If the provided testing condition fails then array.find() returns undefined.In the following example array.find() checks whether the price elements in array are more than the given testing price(12000). If the provided testing ... Read More

What is the importance of _.union() method in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 30-Jul-2019 22:30:26

_.union()_.Union() method belongs to underscore.js a library of javascript. The _.union() function is used to take n number of arrays and return a new array with the unique terms in all those arrays (union of all array). It scrutinizes each and every value of the arrays and pushes out unique values into ... Read More

What is the use of Math.abs() method in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 30-Jul-2019 22:30:26

Math.abs()Math.abs() gives absolute value of a number, that is                                                       p  if p > 0                     ... Read More

Previous 1 ... 4 5 6 7 8 ... 14 Next
Advertisements