Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

How to Check if an Item is in an Array in JavaScript Using Array.includes()

const nums = [ 1, 3, 5, 7];
console.log(nums.includes(3));
// true
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #How #Check #Item #Array #JavaScript #Using
ADD COMMENT
Topic
Name
2+6 =