N
Size: a a a
N
А
А
КК
А
N
IS
likes=n=>n.length===0?"no one likes this":n.length==1?`${n[0]} likes this`:n.length==2?`${n[0]} and ${n[1]} like this`:n.length==3?`${n[0]}, ${n[1]} and ${n[2]} like this`:`${n[0]}, ${n[1]} and ${n.length-2} others like this`
ну вот это работаетN
VL
df
j
..
IS
j
j
IS
V
['cat', 'dog', 'snake', 'cat'].reduce((obj, item) => {
if(!obj[item]) obj[item] = 0;
obj[item]++;
return obj;
}, {});
{cat: 2, dog: 1, snake: 1}
j