Status: Reject
YOE: 3+
1st Round (Screening)
This was their screening round, mostly question were from JS, after a breif Introduction
- Write a function to flatten an array according to given depth
e.g
[[1,2,3],4,[[5,4,3]], [3,[4]]] => [1,2,3,4,[5,4,3], 3,[4]]Completed in 10 mins using iterative method
- Follow up: Put nested one in the end
eg.
[1,2,[3,4,[5,6]],7,8,[9]] => [1,2,7,8,9,3,4,9,[5,6]]Again took 10 mins because got little diverted but then realized just using another array in the above will do it.
Array.isArraypollyfill
I suggested using Object.prototype.toString(obj) I foget to add a call there, interview was like don't come with hacks 🤔 and hinted towards class instance! answered after this hint, instanceOf even this is not reliable in case of Iframes!
Promise.racepollyfill => ansered in a minute!Throttlepollyfill => ansered in a minute!- Cache function => ansered in a minute!
- Asked me about the intersection observer, told the about the API and the use cases.
- How to optimize images loading
- Use single image
- Use differnet image for different resoluation
- Lazy loading
- How to lazy laod a image => Can be done using JS (intersection observer, scroll position etc.), I messed up littler here as I also said native HTML supports it using lazy load attribute (silly me)
- Some CSS basic quesitons answered all.
I don't know what's their selection creteria or why they rejected me, HR ghosted me after this! I was able to answer pretty much everything fast as even I take take interview weekly and these things remain on my finger tips + Leetcode 300+ questions solved.


