So I have an array where it stores the users language, like so:
let language = []
var Lang = "it"
language.push(Lang)
and I do this multiple times with different languages.
I basically want to go through the array, and check:
The array would look like this:
language = ["en", "it", "es"]
then I want to check all of the values in the array, and if none of them are en
, then log.
if (Lang != "en") {
console.log("no en")
}
I think I have to use mapping, I could be wrong. I'm not sure how to do this?