Why does this happen

I’m wondering how the computer is getting 5 + 4 to equal 10???

Hi, @mycatisloud! Welcome to the forums :smile:

Your sumNumbers function is taking only one parameter, number. Then it will return the result of adding number to itself once. I’m assuming it’s taking the 5 as the argument and therefore it prints 10 (since it’s just adding 5 + 5)

Hope this helped :slightly_smiling_face:


oooh, thanks. makes sense now


This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.