Ad
  • Default User Avatar

    With all due respect, you are not right. Function squareSum() takes one argument, not two. Let me explain: func squareSum([],[1,2,2]) will only look for a first argument, which is [] (empty array), and thus result is 0. Also, if you would to call func squareSum([1,2,2], []), the result would be, as expected, 9.