I want to be able to check if a string is equal to any of the strings inside an array. I know you can check multiple parameters like so:
let value = 'sales';
if ( value == 'sales' || value == 'broker' ){}
But I need to use an array like:
let value = 'sales';
let array = ['sales', 'broker'];
if ( value == array ){}
How can I do this?