Codewars - Friend or Foe?
Nicolás Bost

Nicolás Bost @dantedinopegassi

About: Yo tratando de usar un 𝒷𝓁ℴ𝑔 para jugar menos jueguitos

Joined:
Dec 30, 2024

Codewars - Friend or Foe?

Publish Date: Jan 2
0 0

Salutations.

Ralph says hi

I'm posting Codewars challenges and my thought process in this series. I'm using JS and Node 18 whenever possible. Just for the sake of clarity, I'm making fair use of them.

"Friend or Foe?" can be simply done like this:

function friend(friends){
  let trueFriends = friends.filter((dude) => dude.length==4 );
  return trueFriends;
}
Enter fullscreen mode Exit fullscreen mode

Generally performant, and a simple solution. Does the job.

Regards. Drink water 💧💧💧.

Previous

Comments 0 total

    Add comment