Saurabh Anand has Published 21 Articles

How to count text lines inside of a DOM element?

Saurabh Anand

Saurabh Anand

Updated on 21-Feb-2023 17:21:47

3K+ Views

Introduction Before understanding the counting of the lines in a DOM, let's first understand what DOM is? So, DOM is like an API for HTML and XML documents. This logic is enough to understand that DOM is an important concept for web developers. The DOM gives a programming interface ... Read More

How to copy the content of a div into another div using jQuery?

Saurabh Anand

Saurabh Anand

Updated on 21-Feb-2023 17:16:52

8K+ Views

We can use jQuery html() method to copy the content of a div into another div. In jQuery, many other methods, such as clone(), append() & appendTo(), etc., can be used to copy the content. jQuery is a JavaScript library designed to simplify HTML DOM tree traversal and manipulation, as ... Read More

How to convert UTC date time into local date time using JavaScript?

Saurabh Anand

Saurabh Anand

Updated on 21-Feb-2023 17:11:52

31K+ Views

Timezone handling is an essential component of every web application. The time that is recorded in the backend is usually in UTC format. When it is displayed to the user, however, it must be converted to the user's local time. This is possible with JavaScript. We'll look at how to ... Read More

How to convert string into float in JavaScript?

Saurabh Anand

Saurabh Anand

Updated on 21-Feb-2023 17:10:36

13K+ Views

We can convert a string into a float using the parseFloat() function or the Number() constructor in JavaScript. Other approaches such as using + operator, eval() and parseInt() methods, can also be used for this. Converting strings to floating point numbers is a typical operation in JavaScript. This is required ... Read More

How to convert special characters to HTML in Javascript?

Saurabh Anand

Saurabh Anand

Updated on 21-Feb-2023 17:09:04

6K+ Views

We can use replace() method to convert special characters to HTML in JavaScript. This method can also be applied with a map. There are many other methods that can be used for this task. We will discuss these methods in detail in this article. We will start our discussion with ... Read More

ES2015: Latest version of JavaScript

Saurabh Anand

Saurabh Anand

Updated on 19-Jan-2023 13:19:49

459 Views

ES2015, also known as ECMAScript 6, is the latest version of JavaScript that was officially released in June 2015. It brings a number of new features and improvements to the language, making it easier to write more efficient and maintainable code. In this tutorial, we will take a look at ... Read More

Event Firing in JavaScript

Saurabh Anand

Saurabh Anand

Updated on 19-Jan-2023 12:59:18

1K+ Views

Events in JavaScript are the actions performed by the browser or the user. Some of the examples of events are − On webpage load On keypress On hover On click, etc. When javascript code is embedded in HTML runs, js reacts to these events and allows the code ... Read More

ES6 Trampoline Function

Saurabh Anand

Saurabh Anand

Updated on 19-Jan-2023 12:50:38

409 Views

In this tutorial, we will mainly focus on the Trampoline function that appeared first in ES6(ECMAScript 6). We will start with the discussion of the Trampoline function. Need of using the Trampoline function. Advantages and disadvantages of using the Trampoline function. Now, let’s see the Trampoline function. What is a ... Read More

ES6 Features and Syntax

Saurabh Anand

Saurabh Anand

Updated on 19-Jan-2023 12:43:59

377 Views

ECMAScript 6, also known as ES6 or ECMAScript 2015, is the latest version of the ECMAScript language specification. It was released in 2015 and introduced many new features and syntax improvements to JavaScript, making it easier to write and maintain complex applications. In this tutorial, we'll take a look at ... Read More

Error: Permission denied to access property ‘target’ in JavaScript

Saurabh Anand

Saurabh Anand

Updated on 19-Jan-2023 12:16:44

4K+ Views

"Error − Permission denied to access property 'target'" is a common error message that can occur when working with JavaScript, especially when attempting to access the target property of an event object. This error occurs when a script is trying to access a property or method of an object that ... Read More

Advertisements