0

I want to create a function that return true if I find 5 items of the same value.

My array: ['d', 'd', 's, 'c', 'h', 's']

For example, if I find 5 times 'd', I want to return true. The same goes for 'h', 's' or 'c'.

Is there a simple way to do this?

Delgan
  • 16,542
  • 9
  • 83
  • 127
Sharpless512
  • 2,789
  • 5
  • 32
  • 59

0 Answers0