What's in a (function) name?How does function.name and name binding work in Javascript?11 min readยทbendtherules.hashnode.dev1VJan 1, 2022
Closure and this - How are variables resolved within a function?Let's start with a example of closure - function outer() { // scope A var myText = 'Hello' return function inner() { // scope B console.log(myText) } } { // scope C let myText = 'World' let fn = outer() fn(); } Here we have ...7 min readยทbendtherules.hashnode.dev3ALBAug 2, 2020
How does in-built Array iterator work?We use [...someArray] or array.values() to get multiple values out of a array. And we kind of know how it works - it just returns all the values from the array. Now internally, both of them uses the iterator protocol - which is already defined on ar...5 min readยทbendtherules.hashnode.dev1BJul 12, 2020
Flipkart UI Engineer 1 interview - My experience๐๏ธ Hi, I am Abhas. I interviewed at Flipkart for UI engineer 1 role in the beginning of 2019. It's already been one year from then, but I never publicly wrote about it. Over time, some people have asked me about the UI interview process at Flipkar...6 min readยทbendtherules.hashnode.dev1TApr 26, 2020
What is `this` inside foo.bar()?The problem Calling a method directly works as expected.But when we pass a method as callback, it loses reference to the original object (as this) when called. Why is that? Can the spec help us explain this difference? The explanation For methods, ...bendtherules.hashnode.dev1AMar 30, 2020