6 ms·
> ask someone to write a signature for array flat Out of curiosity - what do you think is a satisfactory answer here? My answer would vary wildly based upon m
by monkpit 11mo ago
> ask someone to write a signature for array flat
Out of curiosity - what do you think is a satisfactory answer here?
My answer would vary wildly based upon more details, but at the most basic all I can think you could guarantee is Array<unknown> => Array<unknown>?
- epolanski 11mo agoIn an interview I'd be happy just seeing some reasoning. IRL I'd be happy with someone at least searching for a definition and trying to learn from it. I've asked this question multiple times as implementing array flatten used to be our go to ice breaker question, and many devs had no issues reasoning and finding an okay type definition.