Kontrola wartości tablicy JavaScript
const names = ["code","codepadding"]
const key = "codepadding";
var have = names.includes(key) // return true / false
if(have){
// do something
}
CodePadding