Abdul Rawoof has Published 34 Answers

Window.onload vs onDocumentReady in javascript

Abdul Rawoof

Abdul Rawoof

Updated on 02-Sep-2022 12:37:51

In JavaScript, window.onload and document.ready() are the methods used when the page is being loaded. Window.onload The window.onload method gets executed after the entire web page is loaded. This includes all the elements related with DOM like the head tag, tittle tag and all the other tags including the style ... Read More

Difference between .extend() / .assign() and .merge() in Lodash library.

Abdul Rawoof

Abdul Rawoof

Updated on 02-Sep-2022 12:31:17

The Lodash library is in JavaScript, which works on the top of ‘_.js’. It can be used while working with arrays, strings, objects, numbers, etc. The assign() method This function is used to copy the original object into a new object. The difference in this and the spread operator is ... Read More

How to read and write a file using Javascript?

Abdul Rawoof

Abdul Rawoof

Updated on 02-Sep-2022 12:17:02

The read and write operations in a file can be done by using some commands. But the module which is required to perform these operations is to be imported. The required module is ‘fs’ which is called as File System module in JavaScript. Write operation on a file After the ... Read More

How to duplicate Javascript object properties in another object?

Abdul Rawoof

Abdul Rawoof

Updated on 02-Sep-2022 12:10:12

In JavaScript, objects are the collection of a key value pairs. The properties of the object are the keys and is denoted with a string. The value of the key is the value of the property of the given object. In JavaScript, the objects can be copied to other by ... Read More

What is the use of .stack property in JavaScript?

Abdul Rawoof

Abdul Rawoof

Updated on 02-Sep-2022 12:02:25

The Stack property in JavaScript is used to store and keep track of the errors and saves the information such as the type of the error, where the error is raised and the reason of the error. The path of the origin of the error is also stored in the ... Read More

Get div height with vanilla JavaScript

Abdul Rawoof

Abdul Rawoof

Updated on 02-Sep-2022 11:58:51

The HTML element is represented by the Div Object in the HTML DOM. When styling other HTML elements with CSS or with JavaScript, this tag is used to indicate the container for those elements. The default container for flow content in HTML is the div element. It doesn't affect ... Read More

Difference between test () and exec () methods in Javascript

Abdul Rawoof

Abdul Rawoof

Updated on 02-Sep-2022 11:55:12

The RegExp.prototype.test() and RegExp.prototype.exec() methods are the methods in JavaScript used to handle regular expressions. In addition to these two JavaScript includes a number of built-in methods for manipulating and processing text using regular expressions. What are regular expressions? Regular expressions are patterns that are used to search for character ... Read More

Difference between console.dir and console.log in javascript?

Abdul Rawoof

Abdul Rawoof

Updated on 02-Sep-2022 11:43:02

In JavaScript, dir() and log() are the methods of console object. Console object provides access to the browser’s debugging console. The console.dir() method The console.dir() method output the list of object properties of a specified object in the console to the user. It recognizes the object just as an object ... Read More

Different techniques for copying objects in JavaScript

Abdul Rawoof

Abdul Rawoof

Updated on 02-Sep-2022 11:38:47

In JavaScript, objects are the collection of a key value pairs. The properties of the object are the keys and is denoted with a string. The value of the key is the value of the property of the given object. Types/Techniques of object copying There are 2 types of copying ... Read More

Is it possible to change values of the array when doing foreach() in javascript?

Abdul Rawoof

Abdul Rawoof

Updated on 02-Sep-2022 11:38:10

Array is a data type which can store multiple elements of similar data types. For example, array is declared as integer data type then it stores one or more elements of the integer data type. In arrays the element can be manipulated when they are in a loop by using ... Read More

Advertisements