Vineeth.mariserla has Published 140 Articles

How to remove the last digit of a number and execute the remaining digits in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 06-Dec-2022 07:44:55

In this article we are going to discuss how to remove the last digit of a number and execute the remaining digits using JavaScript.A number firstly should be converted into the string after that you perform your operation like the length of the string − 1 after the removed the last element ... Read More

How to concatenate two strings so that the second string must concatenate at the end of first string in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 27-Jul-2022 07:58:42

concat() methodThe fundamental operation for combining two strings is concatenation. String combining is a necessary part of programming. We need to first clear out the fundamentals before we can discuss "String Concatenation in JavaScript." A new string is produced when an interpreter performs the operation.In order to create a new ... Read More

Explain in detail about Mark and Sweep algorithm in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 04-Jul-2020 15:01:53

Mark and Sweep algorithmMark and Sweep algorithm looks out for objects 'which are unreachable' rather than objects 'which are no longer needed'. This algorithm is the improvement of Reference-counting algorithm.This algorithm actually goes through 3 important steps. Root: In general, a root is a global variable that is used in the ... Read More

Explain in detail about memory leaks in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 04-Jul-2020 14:46:34

Memory leaks in JavaScriptJavaScript is called garbage collected language,  that is when variables are declared, it will automatically allocate memory to them. When there are no more references for the declared variables, allocated memory will be released. Memory leaks or most of the memory related problems will occur while releasing ... Read More

Using a JavaScript object inside a static() method?

vineeth.mariserla

vineeth.mariserla

Updated on 02-Jul-2020 12:46:34

Actually, the result will be in vain when we try to use an object inside a static method. But when the object is sent as a parameter, we can access the object. let's discuss it in a nutshell.Example-1In the following example, we tried to use the object "myComp" directly rather than ... Read More

What is importance of startsWith() method in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 01-Jul-2020 10:54:31

To know Whether a string starts with a particular character or a string indexOf() method is used. But in the advanced applications, this method is obsolete. So, ES6 has provided us with startsWith() method to perform those advanced tasks.In the following example, the IndexOf() method is used to find whether ... Read More

What is the use of test() method in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 01-Jul-2020 10:52:34

The test() method is a regular expression method. It searches a string for a pattern, and returns true or false, depending on the result. If it encountered the given pattern it returns true, else returns false. It is case sensitive. Let's discuss it in detail.Example-1In the following example, a text named "Tutorix ... Read More

How to return an array whose elements are the enumerable property values of an object in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 01-Jul-2020 08:08:49

We can use some logical methods to get the values and also keys from an object, but those methods will not return the values as an array, which is very useful in many cases. Javascript has provided Object.values() method to get an array whose elements are the enumerable property values of ... Read More

How to remove all the elements from a map in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 01-Jul-2020 07:26:13

The map is basically a collection of elements where each element is stored as a Key, value pair. It can hold both objects and primitive values as either a key or a value. When we iterate over the map object it returns the key, value pair in the same order as inserted. The ... Read More

In how many ways can we split a string in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 30-Jun-2020 15:51:27

In javascript, we can split a string in 3 ways. One is an old way in which string.split() method is used and later on, ES6 has provided 2 more ways to split a string. In the first way spread operator is used and in the second way array.from() method is used. Let's ... Read More

1 2 3 4 5 6 7 ... 14 Next
Advertisements