A quick intro, I am a total noob learning JS and feel that it's going well, however I am doing a simple exercise right now and I'm hung up on something.
I have learned that: a falsey value is a value that is considered false when encountered in a boolean context ex: false, 0, -0, 0n, "", null, undefined, NaN (Not a number) truthy is everything other than falsey (such as a String, boolean true, any number not 0 etc.)
so in my example below, if anyone could help me understand why value => value == true, would print out false (as was the case) when I have a string value in my array ("Angela"). Thanks!
let values = [11, NaN, [], "Angela"]
function checkForFalsey() {
if (values.some(value => value == true)) {
console.log("At least one item is falsey")
}
}
checkForFalsey()