Manisha Patil has Published 32 Articles

What is the drawback of creating true private methods in JavaScript?

Manisha Patil

Manisha Patil

Updated on 24-Aug-2022 07:09:29

450 Views

Using private methods has a simple underlying concept. In this situation, you can declare private methods or private properties, which are used to hide a class's internal functionality from those other classes, whenever you wish to keep something private, whether it be a method or a property. You can include ... Read More

Tag names of body element's children in JavaScript?

Manisha Patil

Manisha Patil

Updated on 24-Aug-2022 06:52:36

483 Views

A property of an element called "children" delivers all child elements of the element as objects. We will learn how to use Javascript to obtain the child element of the parent in this tutorial. The challenge is to use JavaScript to choose a certain element in an HTML document and ... Read More

Is JavaScript a pass-by-reference or pass-by-value language?

Manisha Patil

Manisha Patil

Updated on 23-Aug-2022 14:54:54

588 Views

JavaScript provides us with functions, that are a collection of pre-defined instructions or statements that are only carried out when we call the function that contains this code. The function accepts one or more arguments as input and output. You can pass values or references for the input arguments. All ... Read More

How to generate a random number in JavaScript?

Manisha Patil

Manisha Patil

Updated on 23-Aug-2022 14:40:22

2K+ Views

The Math object, a built-in object with attributes or methods for carrying out mathematical operations, has the native implementation of the random() method in JavaScript. As its name suggests, the random() method aids in the generation of random numbers. The return value of the Math.random() method is a floating-point, sort ... Read More

Passing unknown number of arguments to a function in Javascript

Manisha Patil

Manisha Patil

Updated on 23-Aug-2022 13:46:05

3K+ Views

The terms "parameters" and "arguments of a function" are frequently used synonymously in JavaScript, despite the fact that there is a substantial distinction between the two. The function parameters are included when we define a function. While defining a function, you may also specify a list of variables; these variables ... Read More

"extends" keyword in JavaScript?

Manisha Patil

Manisha Patil

Updated on 23-Aug-2022 13:37:33

1K+ Views

In JavaScript, you may extend both classes and objects with the extends keyword. It is frequently used to build classes that are children of other classes. In addition to built-in objects, customized classes can also be subclass using the extends keyword. The classes serve as the blueprint for a real-world ... Read More

Create many JavaScript objects as the same type?

Manisha Patil

Manisha Patil

Updated on 23-Aug-2022 13:34:16

2K+ Views

JavaScript is a lenient object-oriented language. We'll look at various JavaScript object creation methods in this article. It is crucial to know that JavaScript is an object-oriented language based on prototypes instead of classes before moving on. It can be more difficult to understand how JavaScript enables you to build ... Read More

What is the importance of '/i' flag in JavaScript?

Manisha Patil

Manisha Patil

Updated on 04-Aug-2022 11:35:56

518 Views

Let us understand first about regular expressions before jump into I flag. A string of characters that creates a search pattern is called a regular expression. The search pattern can be applied to text replacement and search operations. A regular expression might be a simple pattern with one letter or ... Read More

What is the importance of '/g' flag in JavaScript?

Manisha Patil

Manisha Patil

Updated on 04-Aug-2022 11:34:12

640 Views

Let us understand first about regular expressions before jumping into the /g flag. A string of characters that creates a search pattern is called a regular expression. The search pattern can be applied to text replacement and search operations. A regular expression might be a simple pattern with one letter ... Read More

How to get the protocol and page path of the current web page in JavaScript?

Manisha Patil

Manisha Patil

Updated on 04-Aug-2022 11:22:29

760 Views

Protocol The URL segment that specifies the data transfer protocol to be utilised is referred to as the protocol of a URL. In this example, https:// indicates for the HTTPS protocol. We will learn how to obtain the website URL for the currently seen webpage or website in this article. ... Read More

Advertisements