My question is this ...
I get a value through a parameter, but I want to check if that value is really what I need. Example:
rightWord = 'AC' || 'AL' || 'AP' || 'AM' || 'BA' || 'CE' || 'ES' || 'GO' || 'MA' || 'MT' || 'MS' || 'MG' || 'PA' || 'PB' || 'PR' || 'PE' || 'PI' || 'RJ' || 'RN' || 'RS' || 'RO' || 'RR' || 'SC' || 'SP' || 'SE' || 'TO' || 'DF'
function testing (test){
if(rightWord === test){
console.log('ok')
}else{
console.log('not')
}
}
testing('TEST')
How can I do, to check if the parameter I pass through testing () is the same as some words I want to validate?
Obs: Sorry, I'm studying but I can't solve this problem.