I can understand when someone skips some edge cases when writing an example because supporting them would make code really long or much harder to understand. But this isn't the case here. You could write () => [] and argue all day that this is a partial polyfill of flat because it works for some inputs. Or you could fix your buggy code.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I have written partial polyfill, which shows how it works. I have not tried to replicate whole code of flat method.
Also you can observe I have written it as pure function not as Array method.
Partial polyfill, huh? Oh I see, It's not a bug it's a feature ;) Good luck with this attitude.
Have a read
webreflection.blogspot.com/2011/06...
I can understand when someone skips some edge cases when writing an example because supporting them would make code really long or much harder to understand. But this isn't the case here. You could write
() => []
and argue all day that this is a partial polyfill offlat
because it works for some inputs. Or you could fix your buggy code.