Posts

Javascript Logo

How to get the current URL in javascript?

< 1 min readTo get the current URL in JavaScript, you can use the window.location object of the window object. The window.location object contains information about the current URL, and it provides several properties and methods for accessing and manipulating the URL. Here are some examples of how to use the window.location object to get the current URL…

Read More
Javascript Logo

What is closure in Javascript?

2 min readIn JavaScript, a closure is a function that has access to the variables and parameters of its outer function, even after the outer function has returned. Closures are created when a function is defined inside another function, and they allow the inner function to retain its access to the variables and parameters of the outer…

Read More