+ 2

Why isn't the addition function working? It is working as the random number generator!!!

https://code.sololearn.com/W8i4VdYipwD5/?ref=app

3rd Oct 2017, 6:01 PM
B.D
B.D - avatar
3 ответов
+ 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
3rd Oct 2017, 6:22 PM
Shane Overby
Shane Overby - avatar
+ 2
Thanks
4th Oct 2017, 3:26 AM
B.D
B.D - avatar
0
change function names for adding and rand, they r same
3rd Oct 2017, 6:29 PM
Morpheus
Morpheus - avatar