Aman Kumar has Published 44 Articles

Inserting string at position x of another string using Javascript

Aman Kumar

Aman Kumar

Updated on 19-Dec-2022 12:07:26

677 Views

In this article, you are going to learn how to insert a string at a position in another string. JavaScript does not give a direct way to achieve this. For this, we can use the slice method. The slice method extracts a section of a string and returns a new ... Read More

How to Clear the JavaScript Console in Google Chrome

Aman Kumar

Aman Kumar

Updated on 19-Dec-2022 12:05:07

12K+ Views

In this article we are going to learn how to clear the JavaScript Console in Google Chrome. We have various methods to clear the console; but our question is why do we need to clear the console? Sometimes we have lots of commands and logs printed in any browser console ... Read More

Dynamically creating keys in JavaScript associative array

Aman Kumar

Aman Kumar

Updated on 19-Dec-2022 12:01:59

3K+ Views

In this article, we are going to discuss how to create keys in a JavaScript associative array dynamically. Associative arrays are dynamic objects that are user defined as needed. When you assign values to keys in a variable of types array, then the array is transformed into an object, and ... Read More

Why Ember.js is the best javascript frame work?

Aman Kumar

Aman Kumar

Updated on 19-Dec-2022 11:58:06

162 Views

Ember.js is the best framework. The user of Ember.js is increasing day by day. The popularity of ember.js is 6.3% of JavaScript developers currently using ember. Its popularity has stood over the last two years. Ranked 4th most popular JavaScript framework. Ember.js is an MVVM (Model−view−view−model) model framework for complex ... Read More

How to do image preloading with javascript?

Aman Kumar

Aman Kumar

Updated on 19-Dec-2022 11:41:43

977 Views

The preload attribute specifies how the author thinks about the media file should be loaded when the page loads. The preload attributes allow the author to provide hints to the browser about how much time should take to load a page, it will lead to the best user experience. Preload ... Read More

How to set a countdown timer in javascript?

Aman Kumar

Aman Kumar

Updated on 19-Dec-2022 11:36:37

7K+ Views

We can set a countdown timer in JavaScript using the setInterval() method. This method continuously calls a function or executes a code snippet with a fixed time delay between every call. The setInterval() method calls a function at described intervals in milliseconds. It continues calling the function until the clearInterval() ... Read More

How to get the size of a json object in JavaScript?

Aman Kumar

Aman Kumar

Updated on 19-Dec-2022 11:33:57

7K+ Views

In this article, we will learn about various methods to get the size of a JSON object in JavaScript. Getting the size of the object in JavaScript is same as the counting the total number of keys of an object. In general, we can get the size or number of ... Read More

How do I add a class to a given element using Javascript?

Aman Kumar

Aman Kumar

Updated on 19-Dec-2022 11:31:44

671 Views

In JavaScript, there are various approaches to add a class to an element. We can use the .className attribute or the .add() method to add a class name to the specific element. The class attribute can be used in CSS to perform some tasks for the elements with the ... Read More

Javascript Map vs Object — What and when?

Aman Kumar

Aman Kumar

Updated on 19-Dec-2022 11:26:09

258 Views

The JavaScript Map is the data structure that helps us to store the data in the form of pairs. The pairs consist of a unique key and value mapped to the key. It helps to prevent duplicity. The JavaScript Object also follows the same concept as that of a map ... Read More

How can you detect the version of a browser using Javascript?

Aman Kumar

Aman Kumar

Updated on 19-Dec-2022 11:16:05

4K+ Views

In this article, we are going to discuss how to detect the version of a browser using JavaScript. These days, most browsers are JavaScript−enabled. But still, there are some browsers that don’t support JavaScript; or, some versions of some browsers don’t support certain features of JavaScript. Therefore, in certain instances, ... Read More

Advertisements