DEV Community

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

Thanks for collaborating and giving your opinion :D