0

I have a list List = [Boy, Boy, Boy, Girl, Boy, Key, Girl] how do I grab only the each of these values and push it on to another new array in JavaScript using a for loop?

Input = [Boy, Boy, Boy, Girl, Boy, Key, Girl] Output = [Boy, Girl, Key]

  • I can't find a problem that is similar to this one on here. Don't know why it's a duplicate. can you send a link? thanks – Elton D Nov 30 '18 at 22:56
  • You basically want to remove dupe elements from an array. In the link above there are dozens of methods how to solve it, including for loop. https://stackoverflow.com/a/9229784/6695924 – kind user Nov 30 '18 at 22:59

0 Answers0