Reg Ex con filtro en JS
function countSmileys(arr) {
return arr.filter(x => /^[:;][-~]?[)D]$/.test(x)).length;
}
anas ben rais
function countSmileys(arr) {
return arr.filter(x => /^[:;][-~]?[)D]$/.test(x)).length;
}