ABAbhas Bhattacharyainbendtherules.hashnode.dev·Jan 1, 2022 · 11 min readWhat'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...01V
ABAbhas Bhattacharyainbendtherules.hashnode.dev·Aug 2, 2020 · 7 min readClosure 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 ...03ALB
ABAbhas Bhattacharyainbendtherules.hashnode.dev·Jul 12, 2020 · 5 min readHow 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...01B
ABAbhas Bhattacharyainbendtherules.hashnode.dev·Apr 26, 2020 · 6 min readFlipkart 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...01T
ABAbhas Bhattacharyainthenextbigwriter.hashnode.dev·Mar 30, 2020What 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, ...00