Vineeth.mariserla has Published 117 Articles

How to access 'this' keyword inside an arrow function in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 01-Aug-2019 14:12:25

469 Views

"this" keyword in an arrow functionThe JavaScript 'this' keyword refers to the object it belongs to. In an arrow function, 'this' belongs to a global object. Inside a simple function, there might be chances that 'this' keyword can result in undefined but in an arrow function it results in an ... Read More

What is the use of Math.asinh() and Math.acosh() functions in javascript?

vineeth.mariserla

vineeth.mariserla

Updated on 31-Jul-2019 14:04:10

91 Views

Math.asinh() and Math.acosh() functions are used to find the hyperbolic arc-sine and hyperbolic arc-cosine of a number respectively. These functions are static methods of Math, therefore they are always used as Math.asinh() and Math.acosh(), rather than as methods of a math object created.Math.asinh()This method is used to find the hyperbolic ... Read More

What is the use of Math.imul( ) Function in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 31-Jul-2019 13:44:55

115 Views

Math.imul( )Unlike other multiplying functions, the Math.imul() function returns the result of the C-like 32-bit multiplication of the two parameters. Its application is very high in projects like Emscripten. syntaxvar product = Math.imul(a, b);This method takes two numbers and gives out their multiplication value.Example-1In the following example, two normal integers were ... Read More

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

vineeth.mariserla

vineeth.mariserla

Updated on 31-Jul-2019 13:18:13

82 Views

Math.clz32()The Math.clz32() function returns the number of leading zero bits in the 32-bit binary representation of a number. In a binary representation, there are 32 numbers consisting of only 1's and 0's. This method scrutinizes through each and every element and returns the number of 0's.syntaxMath.clz32(number);Example-1In the following example, numbers ... Read More

What is the importance of Symbol.isConcatSpreadable in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 31-Jul-2019 09:21:18

130 Views

Symbol.isConcatSpreadableThis well-known symbol is used to configure if an object should be flattened to its array elements when using the Array.prototype.concat() method. If it is false then there is no flattening of the array takes place. By default, the Symbol.IsConcatSpreadable is true. Therefore until and unless it is not declared explicitly flattening of ... Read More

How to Title Case a sentence in JavaScript?

vineeth.mariserla

vineeth.mariserla

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

10K+ Views

Title Case a sentence in javascriptIt is nothing but converting first element of all the words in a sentence in to uppercase while the other elements remain in lowercase. The provided string(sentence) may contains a bunch of lowercase and uppercase elements. So we need an algorithm to Title Case the ... Read More

How to parse an URL in JavaScript?

vineeth.mariserla

vineeth.mariserla

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

273 Views

Parsing an URLIt is very simple to parse an URL in javascript by using DOM method rather than Regular expressions. If regular expressions are used then code will be much more complicated. In DOM method just a function call will return the parsed URL. In the following example, initially a function ... Read More

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

vineeth.mariserla

vineeth.mariserla

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

1K+ Views

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

124 Views

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

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

vineeth.mariserla

vineeth.mariserla

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

191 Views

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

Previous 1 ... 3 4 5 6 7 ... 12 Next
Advertisements