bendtherules writes stuff

HomeBadges
Blog Author Picture

Abhas Bhattacharya

61 followers

Just another front-end guy. Love typescript and meta-stuff.
bendtherules on the web, Abhas in real life.

Currently, I work at flipkart.

Closure and this - How are variables resolved within a function?

Aug 2, 20207 min read

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 ...

How does in-built Array iterator work?

Jul 12, 20205 min read

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...

Flipkart UI Engineer 1 interview - My experience

Apr 26, 20206 min read

πŸŽ™οΈ 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...

What is `this` inside foo.bar()?

Mar 30, 2020

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, ...

My experience with Typescript annotations

Dec 12, 2019

TLDR: Pros β€” Great to start off with. Less commitment, more immediate reward.Cons β€” Annotations feel underpowered β€” verbose and repetitive, different constructs (than .ts, closer to jsdoc), imports are hard, type assertion and generics don’t work tha...

Β© 2021 bendtherules writes stuff

PrivacyTerms
Proudly part of