check if array includes a specific element
Rest
includes([1, 2, 3], 2); Copy
includes([1, 2, 3], 2);
includes([1, 2, 3], 2, 3); Copy
includes([1, 2, 3], 2, 3);
check if string includes a specific string
includes('abc', 'b'); Copy
includes('abc', 'b');
includes('abc', 'b', 'c'); Copy
includes('abc', 'b', 'c');
includes('abc', 'bc'); Copy
includes('abc', 'bc');
check if array includes a specific element