Shubham Vora has Published 836 Articles

How do you access the matched groups in a JavaScript regular expression?

Shubham Vora

Shubham Vora

Updated on 25-Jul-2022 07:35:18

938 Views

This tutorial will teach us to access the matched groups in JavaScript regular expression. The regular expression is the sequence of the character, also called the RegEx, and it is useful to match specific patterns in the string.There can be more than one match for the specific pattern in the ... Read More

How does JavaScript 'return' statement work?

Shubham Vora

Shubham Vora

Updated on 22-Jul-2022 13:06:08

2K+ Views

In this article, we will learn how to work with a return statement in JavaScript. A specific value from the function is returned to the function caller using the return statement. Whenever the return statement is run, the function will stop. The code that follows the return statement won't be ... Read More

How does JavaScript .prototype work?

Shubham Vora

Shubham Vora

Updated on 22-Jul-2022 13:01:53

456 Views

In this example, we will learn how the prototype works in JavaScript. It is rare if a JavaScript developer doesn’t use the objects while developing the functions, and the objects can make a lot of work easy for developers.The prototype is also the advanced concept associated with the objects in ... Read More

How do I print Unicode characters in the console using JavaScript?

Shubham Vora

Shubham Vora

Updated on 22-Jul-2022 12:55:58

4K+ Views

In this article, we will learn how to print Unicode characters in the console using JavaScript. No matter the platform, the software, or the language, Unicode assigns a unique number to each character.Most writing systems' characters are defined by the universal character set known as Unicode, which also assigns each ... Read More

How do I display image in alert/confirm box in JavaScript?

Shubham Vora

Shubham Vora

Updated on 22-Jul-2022 12:41:15

5K+ Views

In this tutorial, we will learn to display the image in the alert or confirm box in JavaScript. The alert() is the JavaScript method that displays the alert or confirms box on the top center of the screen when you invoke it.As a programmer and user, you have seen on many ... Read More

How do I declare a namespace in JavaScript?

Shubham Vora

Shubham Vora

Updated on 22-Jul-2022 12:22:55

6K+ Views

A namespace is a programming concept that gives identifiers (names of types, functions, variables, etc.) scope to avoid name conflicts. For instance, a program may need to use the same variable name in many contexts. In such a case, namespaces will separate these contexts so that the same identifier may ... Read More

How do we use throw statement in JavaScript?

Shubham Vora

Shubham Vora

Updated on 20-Jul-2022 14:27:37

763 Views

In this tutorial, we will learn to use the throw statement in JavaScript. The “throw” is the reserved keyword in JavaScript, and Programmers can use the throw keyword to create the user-defined exception.Every programmer is not perfect, so they can’t write the JavaScript code without making a single error. It ... Read More

How do I subtract minutes from a date in JavaScript?

Shubham Vora

Shubham Vora

Updated on 20-Jul-2022 13:59:15

6K+ Views

In this tutorial, we will learn to subtract minutes from the date in JavaScript. While developing the applications, programmers need to play with the dates many times. All JavaScript programmers are lucky enough that JavaScript contains the built-in date class with hundreds of different methods.In this tutorial, we will learn ... Read More

How do I replace a character at a particular index in JavaScript?

Shubham Vora

Shubham Vora

Updated on 20-Jul-2022 08:56:37

2K+ Views

It is often required to update the string and replace the single character at a particular index while programming with JavaScript. JavaScript doesn’t contain the built-in method to replace the single character at the particular index in the string as the Java and C++, but we can use some other ... Read More

How do I empty an array in JavaScript?

Shubham Vora

Shubham Vora

Updated on 20-Jul-2022 08:40:09

584 Views

This tutorial teaches us to make an array empty in JavaScript. While programming with JavaScript, programmers need to make an array empty in many conditions. For example, coders are doing competitive programming with JavaScript. Suppose, to solve some problem, they need to create a new or an empty array while ... Read More

Advertisements