DEV Community

loading...

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 Author

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