A callback the function is a function that is passed to another function as an argument and is executed after some operation has been completed. Below is an example of a simple callback function that logs to the console after some operations have been completed. In above example we have modifyArray function to which we have one passed one…
Category: Uncategorized
What is typeof operator?
JavaScript provides a typeof operator that can examine a value and tell you what type it is
Different Object.freeze() and Object.seal()
The Objct.freeze() and Objet.seal() are the method of an Object, it help us to make our object immutable. For eg. we have created one object and we want that object should not be modified we can use these 2 methods. Object.freeze() This method will prevent any modifcation to object and hence it will make object…
How to create objects in JavaScript
There are 3 ways to create a object in JavaScript 1.Using object literal We can user curly brances ({}) to create a object and define objects properties in curly brackets in key value pairs. let person = { firstName: ‘pravin’ , lastName: ‘khalase’} 2.By creating instance of Object Here, we can create object using new…
What is Event Bubbling
The event bubbling is method of event propagation, If there are nested elements and some events registered for those elements, if we trigger the child element event then it bubbles up to parent and hence its its parent event is also captured and this is called event propagation. First inner element(child) element is captured and…
Difference between slice and splice
Splice The splice() method returns the removed item(s) in an array The original array is affected Slice The slice() method returns the selected element(s) in an array, as a new array object The original array is not affected
Hello world!
Welcome to WordPress. This is your first post. Edit or delete it, then start writing!