let mobile = [
"+9384849202",
"+5808789645",
"+0989645643",
"+7864769845",
]
console.log(mobile.indexOf("+7864769845"))
the result of this is -1 when the expected result is 3
thought it was a type error at first, but now I'm not sure?
There is a hidden zero-width "invisible" character at the start of each string in the array. If you delete them, it works as expected.
let mobile = [
"+9384849202",
"+5808789645",
"+0989645643",
"+7864769845",
]
console.log(mobile.indexOf("+7864769845"))