Ver Mensaje Individual
  #4 (permalink)  
Antiguo 12/01/2015, 19:34
germangutierrez
 
Fecha de Ingreso: enero-2015
Mensajes: 43
Antigüedad: 9 años, 4 meses
Puntos: 3
Respuesta: Contar valores especificos

ojo

Código:
var MyArray = ['Perro','Gato','Perro','Gato', 'PezGato'];
MyArray.toString().match(/Gato/g) .lenth // => 3

MyArray.toString().replace(/,/g,"\r\n").match(/^Gato$/gm).lenght // =>2