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
Javascript Logo

What does use strict do in javascript?

< 1 min readThe “use strict” directive is a way to opt in to a restricted variant of JavaScript. It enables strict mode, which is a way to write more secure and efficient code by eliminating certain syntax and behaviors that are potentially error-prone or confusing. When strict mode is enabled, JavaScript will throw more exceptions and will…

Read More