Why is it not showing the variable money on #amount? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why is it not showing the variable money on #amount?

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

31st Mar 2022, 12:59 PM
Lego in Motion
Lego in Motion - avatar
3 Answers
+ 2
Lego in Motion click is already a reserve function so change your function with another name Also when you call function from html contents then function definition should not be inside window.onload function https://code.sololearn.com/W2PKstjl3D53/?ref=app
31st Mar 2022, 1:13 PM
A͢J
A͢J - avatar
0
Thanks but it doesn't show money + 1 every time you click.
31st Mar 2022, 1:16 PM
Lego in Motion
Lego in Motion - avatar
0
Lego in Motion I said change calling function name 'click' to another name. Money will increase. In html, function should be inside double or single quotes
31st Mar 2022, 1:25 PM
A͢J
A͢J - avatar