What'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...1VJan 1, 2022 · 11 min readbendtherules.hashnode.dev
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 ...3ALBAug 2, 2020 · 7 min readbendtherules.hashnode.dev
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...1BJul 12, 2020 · 5 min readbendtherules.hashnode.dev
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...1TApr 26, 2020 · 6 min readbendtherules.hashnode.dev
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, ...1AMar 30, 2020bendtherules.hashnode.dev