Vineeth.mariserla has Published 117 Articles

What is function chaining in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 29-Jun-2020 08:40:24

3K+ Views

Function chainingFunction chaining is nothing but grouping functions in one single line using dot notation. This type of chaining makes the code very concise and also improves the performance.Here we are going to learn function chaining using regular objects.a) Without function chaining In the following example an object 'obj' is created ... Read More

Regular functions vs Arrow functions in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 26-Aug-2019 15:49:36

387 Views

Regular functions vs Arrow functionsAn arrow function is used to write the code concisely. Both functions regular and arrow work in a similar manner but there are some differences between them. Let's discuss those differences in a nutshell.syntax of an arrow functionlet x = (params) => { // code };syntax of a ... Read More

How to access a JavaScript object using its own prototype?

vineeth.mariserla

vineeth.mariserla

Updated on 26-Aug-2019 08:52:59

296 Views

We can able to access the existing object by creating its own prototype using a javascript method called "Object.create()". Using this method we can inherit the properties from the existing properties to the newly created prototype. Let's discuss it in a nutshell.syntaxObject.create(existing obj);This method takes the existing object and creates ... Read More

JavaScript's Boolean function?

vineeth.mariserla

vineeth.mariserla

Updated on 23-Aug-2019 15:17:10

110 Views

Boolean functionWhile developing, a developer may come across yes/no situation. At that point of time Boolean() function can be used. It results only in true or false. Let's discuss it in detail.syntaxBoolean(exp);It takes an expression and scrutinizes it and displays either true or false based on the validity of the ... Read More

Object.assign() in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 20-Aug-2019 14:42:35

560 Views

Object.assign()This method is used to copy one or more source objects to a target object. It invokes getters and setters since it uses both 'get' on the source and 'Set' on the target. It returns the target object which has properties and values copied from the target object. This method ... Read More

First element and last element in a JavaScript array?

vineeth.mariserla

vineeth.mariserla

Updated on 20-Aug-2019 08:19:15

610 Views

An array is a group of elements. Each element has its own index value. We can access any element using these indexes. But in the case of the last element, we don't know the index until we know the number of elements present in the array. In this case, we have ... Read More

Push() vs unshift() in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 19-Aug-2019 13:58:49

194 Views

push() vs unshift()The methods push() and unshift() are used to add an element in an array. But they have a slight variation. The method push() is used to add an element at the end of the array, whereas the method unshift() is used to add the element at the start ... Read More

Value of the class attribute node of an element in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 08-Aug-2019 14:37:37

278 Views

Javascript has provided the getAttributeNode() method to find the attribute node with the specified name of an element, as an attribute object. If the attribute does not exist, the return value is null or an empty string ("").syntaxelement.getAttributeNode(attributename);It returns the attribute object representing the specified attribute node ExampleIn the following example, there are two heading ... Read More

What is setInterval() method in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 05-Aug-2019 11:53:58

271 Views

setInterval()This is one of the many timing events. The window object allows code to execute at every certain interval of time. This object has provided SetInterval() to repeat a function for every certain amount of time. It takes two parameters as arguments. One is the function and the other is the time ... Read More

What is setTimeout() Method in javascript?

vineeth.mariserla

vineeth.mariserla

Updated on 05-Aug-2019 11:10:33

341 Views

 setTimeout()This is one of the many timing events. The window object allows the execution of code at specified time intervals. This object has provided SetTimeout() to execute a function after a certain amount of time. It takes two parameters as arguments. One is the function and the other is the ... Read More

Advertisements