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
  • 18,571
  • 11
  • 90
  • 141
Sharpless512
  • 3,062
  • 5
  • 35
  • 60

0 Answers0