DEV Community

Discussion on: Clean up your code with these tips!

Collapse
 
miniscruff profile image
miniscruff

Not much difference but I like to use sets for these comparisons for faster lookups.

const localDomains = new Set([...])
localDomains.has(...)
Thread Thread
 
dechamp profile image
DeChamp

I actually also like this as a solution. Thank you!