Ad
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    the reduce method takes a callback function, this callback function takes two main params too,

    the first one is called accumulator or previous, this param detects what returned value of the function that called back and assign it to itself.

    so here at first it puts 10 as value to "v" and then put that v in the function witch will evaluate it and lets say that it increases the value by one so the return value is now 11, now the value of v will be updated and become 11 and so on.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution