I am trying to check if a password string contains some special characters.
I am trying to implement that with the following code:
const passwordArr = "A1b2c3d4e5!@#".split("");
const specialChar = "~!@#$%^&*_-+=`|(){}[]:;\"'<>,.?/";
const hasSpecLet = passwordArr.some((letter) => {
specialChar.includes(letter);
});
However, hasSpecLet returns false.