IndexOf

IndexOf

by Durtto

JavaScript

var tipos  = [1, 2 ,4];
var tipoDemissao = 4;

if (tipos.indexOf(tipoDemissao) != -1) {
	alert(tipoDemissao);
}