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…
Month: May 2023
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…