29th May 2020, 5:58 AM
Priyanshu Gupta(à€Șà„à€°à€żà€Żà€Ÿà€‚à€¶à„ à€—à„à€Șà„à€€à€Ÿ)
Priyanshu Gupta(à€Șà„à€°à€żà€Żà€Ÿà€‚à€¶à„ à€—à„à€Șà„à€€à€Ÿ) - avatar
1 RĂ©ponse
0
1) it works if you put the script in the html: <html> <head><title></title></head> <body></body> <script>YOUR CODE HERE...</script> </html> 2) you have bad references in the variables, because you declare a variable into a function but you want to use in another function where the variable doesn't exists. You need to declare outside the function: You have this: function x{ var example = 1; } function y{ example = 2; } but the function Y doesn't know what is "example" So you need to declare outside the function: var example = 1; function x{ example++; } function y{ example++; }
30th May 2020, 10:15 AM
Luis E. GĂłmez Mena
Luis E. GĂłmez Mena - avatar