JSFiddle - React, Tailwind, and code Playground
JavaScript
const statesToWatch = ['Idle', 'Printing', 'Busy']
if (statesToWatch.indexOf('x') == -1) {
console.log(' no es ninguno')
} else {
console.log('es uno de ellos')
}
const statesToWatch = ['Idle', 'Printing', 'Busy']
if (statesToWatch.indexOf('x') == -1) {
console.log(' no es ninguno')
} else {
console.log('es uno de ellos')
}