Answers for "javascript check array contains"

77

javascript array contains

var colors = ["red", "blue", "green"];
var hasRed = colors.includes("red"); //true
var hasYellow = colors.includes("yellow"); //false
Posted by: Guest on October-19-2019

Code answers related to "javascript check array contains"

Code answers related to "Javascript"

Browse Popular Code Answers by Language