JSFiddle - React, Tailwind, and code Playground

by Julian Garcia Castillo

JavaScript

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