Ad
  • Custom User Avatar

    It was unfortunate that when I defined the Kata I did not foresee that people would use those methods to avoid doing the actual recursive/functional implementastion of the solution. Later I wanted to make that feature unavailable to force the right thinking patterns, but that would most likely break all other solutions already offered. So, to avoid that I kept it as is. Some people will solve it the right way and others reading the answer could compare the solutions.

  • Custom User Avatar

    Oh, right. I used all of those in the interests of not reinventing the wheel. Maybe it would also make sense to disallow Array.forEach and Array.reduceRight as well.