Ad
  • Custom User Avatar

    In my work teamLeader always said that if you use forEach, that means you do sth wrong. I think using interface in that clear case is useless and you should use ES6 feature and use reduce. With this code will be cleaner, faster and better.

  • Custom User Avatar

    Using enum for switch case it's good practice, but here is unnecessary. It's like shooting to sparrow from cannon. You could just pass list[0] it's much simpler than list[LIKES_LIST_MEMBER_COUNT.ONE]. Because of that your return is harder to read than ${list[0]}, ${list[1]} and ${list[2]} like this.