check if array includes and set array react code example Example: react check if array contains value console.log(['joe', 'jane', 'mary'].includes('jane')); //true