I have this issue with a JS function array.includes. I have this array:
The thing is when I use this code, nothing will happen.
var array_type;
//array has these 2 values:
//array_type[0] == 0;
//array_type[1] == 2;
if (array_type.includes(2)) {
console.log("good");
}
Do you have any idea why? Thank you for any help.
[0, 2].includes(2) === truehere. You'll need to provide more code to demonstrate your issue.array_typeand where you use it