+ 3

Why am i getting a "Nan" whenever i try to combine the names? I dont know whats wrong with my code.

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

7th Mar 2018, 11:39 AM
Wilfred Florendo
Wilfred Florendo - avatar
2 Respostas
+ 9
The problem is both the functions (the one for combining names and adding numbers) have the same name "myFunction()" You can resolve this by changing the name of one of the functions ( to something like myFunc() or something else). Also don't forget to change the name of the function in button's onclick attribute too Here's the edited version of your code ^^ https://code.sololearn.com/WvMs2n8mlPd2/?ref=app
7th Mar 2018, 12:32 PM
Nikhil
Nikhil - avatar
+ 2
@nikhil thankyou so much. Godbless!
7th Mar 2018, 12:34 PM
Wilfred Florendo
Wilfred Florendo - avatar