Manisha Patil has Published 46 Articles

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

Manisha Patil

Manisha Patil

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

447 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

546 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

How to get the code name and product name of the browser in JavaScript?

Manisha Patil

Manisha Patil

Updated on 04-Aug-2022 11:18:07

345 Views

When a user accesses a web application using JavaScript, the "navigator" object contains details about the browser they are currently using. You may be aware that each browser functions differently when it comes to how it interprets JavaScript. In this case, the navigator object supports in modifying your application to ... Read More

How to find the href and target attributes in a link in JavaScript?

Manisha Patil

Manisha Patil

Updated on 04-Aug-2022 10:28:09

6K+ Views

First, let us understand how attributes work in JavaScript. Any element's attributes can be changed with JavaScript. The attributes property stores them, and invoking it gives you direct access to them. If we target an element with a class, the class will also appear as an attribute, and we can ... Read More

How to convert a date object's content into json in JavaScript?

Manisha Patil

Manisha Patil

Updated on 04-Aug-2022 10:21:22

1K+ Views

The contents of the specified date object are converted into a string using the date.toJSON() function. Applying date() constructor, the date object is generated. Dates describe a particular moment in time. The value of the Date object is described by a string that is returned by the toJSON() function (using ... Read More

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

Manisha Patil

Manisha Patil

Updated on 04-Aug-2022 09:18:23

134 Views

concat() method The 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 ... Read More

Advertisements