preetisays.hashnode.devCall, Apply, bind methods in jsCall, apply and bind methods are some of the basic JS functions which are used to control the scoping of “this” keyword in JS. Call->imagine we have an object method, and and another object method wants to use the function from the first object metho...Sep 25, 2024·1 min read
preetisays.hashnode.devClosure in JSA function along with it's lexical scope inside a function is called closure. example: let's take a we want to increment a value by clicking a button, the basic way we can do it by is using a varible which will be incremented on every click. var clic...Jul 17, 2024·2 min read
preetisays.hashnode.devSwitch(true) in jsWell i was writing this small code to check some conditions using a switch statement, when i came acoss this mundane JS concept where we use Switch(expression) and then the following cases for it, in Java, i remember using switch(variable) which will...Jun 26, 2024·1 min read