Better HN
topnewbestaskshowjobs
Log inSign up

throwawa923423

2 karma · joined Feb 11, 2022 (4y ago) · 2 submissions

Submissions

comment 4y ago · link · parent

I think it is important that you brought awareness to this, this is a really good point and I agree 100%. JavaScript does have hygiene issues with its API design.

comment 4y ago · link · parent

I get where you are coming from, but it is obvious to me `forEach` is side effect because of its return type.

Also I think `forEach` is great for cases such as `arr.forEach(f)` where `arr: Array<T>, f: T => void`.