loading...

re: More readable conditional with Array.includes() VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Perhaps worth noting is that there is a performance penalty with Array.prototype.includes. Such a "membership check" can iterate across the length ...
 

Wow!!! Nice.

I didn't know. Thanks for contribute

 

Ah! If you didn't, Gabriel -- it may be worth your effort in covering some basic data structures and algorithms and algorithmic complexity (in both time and space). This isn't as big a deal when operating on just the front-end (browser) with small chunks of data, but if you ever use JS (Node) on the backend, this is important and also in instances where the UI is comprised of a LOT of data in a single-page app -- think Facebook. I've seen people do multiple nesting of for-loops (in Ruby) that took down an instance of a worker which typically equates to lost earnings due to downtime

code of conduct - report abuse