+ 3
Why am i getting a "Nan" whenever i try to combine the names? I dont know whats wrong with my code.
2 Answers
+ 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
+ 2
@nikhil thankyou so much. Godbless!