Ad
  • Custom User Avatar

    In 'sum' the currentValue is already set to 0 should there be no 'x' or 'y' to add.

    While the first if statement is redundant, perhaps it's helpful for readability.