DEV Community

loading...

Discussion on: More readable conditional with Array.includes()

Collapse
calvintwr profile image
calvintwr

Actually there’s ["maintainer", "admin", "developer"].indexOf(access) > -1 as well. Include is definitely better but I don’t think anyone uses multiple || for the same variable.

Collapse
gabrielrufino profile image
Gabriel Rufino Author

Thanks for collaborating and giving your opinion :D