bendtherules.hashnode.devWhat's in a (function) name?Intro Whenever you are writing a recursive function, there is a small question you have to answer mentally - how can this function call itself? To start off, there is arguments.callee - which seems like a decent option, but it is considered a legac...Jan 1, 2022·11 min read
bendtherules.hashnode.devClosure 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 ...Aug 2, 2020·7 min read
bendtherules.hashnode.devHow 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...Jul 12, 2020·5 min read
bendtherules.hashnode.devFlipkart 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...Apr 26, 2020·6 min read
thenextbigwriter.hashnode.devWhat 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, ...Mar 30, 2020