+ 2
Why isn't the addition function working? It is working as the random number generator!!!
3 Respostas
+ 5
On line number 7 you've got the function that you're expecting to execute when the Addition button is clicked (function myFucntion() { ... }) , but then on line number 50 you have another function that has the same name. The function on line 50 is the one being executed and within that function a random number is generated and and assigned as the innerHTML value of the element where you're displaying the outputs of the functions.
I made this change and it works fine:
https://code.sololearn.com/WWCxWfbJ2XJw/#html
+ 2
Thanks
0
change function names for adding and rand, they r same