If var c = familyArray.includes("Bart"); it will return false but if var c = familyArray.includes("Homer"); it will return true
I want it to be true in the case of Bart as well because it is also included in the array.
Below is my array:
var familyArray = ["Marge", "Homer", ["Bart", "Lisa", "Maggie"]];
var a = familyArray.indexOf("Bart");
var b = familyArray[2][0];
var c = familyArray.includes("Bart");
document.getElementById("demo").innerHTML = c;
console.log(a);
console.log(b);
<p id="demo"></p>