7 kyu

Training JS #30: methods of arrayObject---reduce() and reduceRight()

1,827 of 1,828myjinxin2015
Description
Loading description...
Fundamentals
Tutorials
  • Please sign in or sign up to leave a comment.
  • DianaDob Avatar

    I think this is an excellent kata, I loved it. The explanation with the examples is outstanding, I learned very much, so thank you! Just a remark though: the first test seems to be incorrect, I had to change it manually, then all tests passed (including all random ones). Thanks again, I had a great time with this one!

  • swampslop Avatar

    Just missing some info in the Details for the second two examples

    tailAndHead([1,2,3,4,5]) should return 945 tailAndHead([111,2345,66,78,900]) should return WHAT? tailAndHead([35456,782,569,2454,875]) should return WHAT?

    • myjinxin2015 Avatar

      oops~My fault. just fixed. thanks for your feedback!

      Issue marked resolved by myjinxin2015 9 years ago
    • Aleksei-Uzin Avatar

      I see this is the right test:

      tailAndHead([1,2,3,4,5]) should return 945

      Perhaps you forgot to correct the description? )

    • Chrono79 Avatar

      What is it that should be corrected? I see this in the description:

      Examples
      tailAndHead([1,2,3,4,5]) should return 945
      tailAndHead([111,2345,66,78,900]) should return 7293
      tailAndHead([35456,782,569,2454,875]) should return 12012