funvoidlikes(stringarray[]){array.size()=>constintsz;switch(sz){case0:<<<"no one"," likes this">>>;break;case1:<<<array[0]," likes this">>>;break;case2:<<<array[0]," and ",array[1]," like this">>>;break;case3:<<<array[0],", ",array[1]," and ",array[2]," like this">>>;break;default:<<<array[0],", ",array[1]," and ",sz-2," others"," like this">>>;break;}}["Peter"]=>likes;["Jacob","Alex"]=>likes;["Max","John","Mark"]=>likes;["Alex","Jacob","Mark","Max"]=>likes;
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Trying with Gwion