var a = ['a', 'ff', 'a', 'd', 't', 'a', 'y'];
var count = 0;
for (i = 0; i < a.length; i++) {
if (a[i] == 'a') {
count++;
}
}
console.log(count);
var a = ['a', 'ff', 'a', 'd', 't', 'a', 'y'];
var count = 0;
for (i = 0; i < a.length; i++) {
if (a[i] == 'a') {
count++;
}
}
console.log(count);