Manisha Patil has Published 46 Articles

Node name of an HTML element using javascript?

Manisha Patil

Manisha Patil

Updated on 23-Aug-2022 13:44:23

477 Views

A string representation of the given node's name is returned by the nodeName property. When a node has attributes, it produces a string with the name of the corresponding attribute. When a node is an element, it returns a string with the name of the tag. This property can only ... Read More

Latitude and longitude of the user's position in JavaScript?

Manisha Patil

Manisha Patil

Updated on 23-Aug-2022 13:43:06

3K+ Views

The user's current location can be found using the getCurrentPosition() method. The Geolocation API that HTML5 offers us allows us to know the user's geographic location. The Geolocation API provides the latitude and longitude of the user's current location, that are thereafter delivered to the backend via JavaScript and displayed ... 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

Document.title() use in JavaScript?

Manisha Patil

Manisha Patil

Updated on 23-Aug-2022 13:35:39

5K+ Views

The document's current title can be obtained or changed using the document.title attribute. When present, the value of the is used by default. You can change or get the current title of the document using the document.title attribute. By providing a new title as a string to this attribute, ... 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

Access property as a property using 'get' in JavaScript?

Manisha Patil

Manisha Patil

Updated on 23-Aug-2022 13:31:54

442 Views

Property accessors offer dot notation or bracket notation-based access to an object's properties. Associative arrays are a good way to understand objects (a.k.a. map, dictionary, hash, lookup table). The names of the property names are the keys inside this array. A difference between properties and methods is frequently made when ... Read More

Shift() vs pop() methods in JavaScript?

Manisha Patil

Manisha Patil

Updated on 23-Aug-2022 13:25:47

1K+ Views

To remove an element from an array with JavaScript, use the shift() and pop() functions. However, there is a slight distinction among them. While pop() removes the last element from an array, shift() removes the first element from an array. When using the shift() method, the value that was deleted ... Read More

How to clone an object using spread operator in JavaScript?

Manisha Patil

Manisha Patil

Updated on 04-Aug-2022 11:55:49

1K+ Views

The spread operator, which was first introduced in ES6, is used to unpack the elements of an iterable like an array. Cloning and merging the array is simple thanks to the spread operator. The spread operator could not be used with objects when it was first introduced in ES6. The ... Read More

How to check whether a NaN is a NaN or not in JavaScript?

Manisha Patil

Manisha Patil

Updated on 04-Aug-2022 11:50:13

285 Views

In this article let us understand how to check whether a NaN is a NaN or not in JavaScript. Literal constant that is not quoted Not-a-Number is represented by NaN, a special value. NaN is commonly used to signal an error condition for a function that should return a valid ... Read More

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

Manisha Patil

Manisha Patil

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

281 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

Advertisements