I am attempting to determine if a password string includes any special characters.
I am trying to achieve this using the code below:
const passwordArr = "A1b2c3d4e5!@#".split("");
const specialChar = "~!@#$%^&*_-+=`|(){}[]:;\"'<>,.?/";
const hasSpecLet = passwordArr.some((letter) => {
specialChar.includes(letter);
});
Unfortunately, the result of hasSpecLet is false
.