Vineeth.mariserla has Published 117 Articles

JavaScript Sleep() function?

vineeth.mariserla

vineeth.mariserla

Updated on 02-Sep-2023 12:26:06

48K+ Views

Sleep()With the help of sleep() we can make a function to pause execution for a fixed amount of time. In programming languages such as C and PHP we would call sleep(sec). Java has thread.sleep(), Python has time.sleep() and Go has time.Sleep(2 * time.Second).JavaScript doesn't have these kinds of sleep functions. But we should thank promises and ... Read More

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

3K+ Views

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

1K+ Views

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

976 Views

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

435 Views

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

62 Views

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

63 Views

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

1K+ Views

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

166 Views

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

1K+ Views

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

1 2 3 4 5 ... 12 Next
Advertisements