+ 2
Am I on the right Patch with my code?
Hello i create a clicker game for the game challenge. that is my first code that i write free by my self. there are some bugs but thats not the problem i want to know if i on the right way to write my code? iam happy about any advice! it will good when the differents will not so big about to my code. i want to understanding the code so it must not be the best practise thank you very much Stevo https://code.sololearn.com/WYs96dWwAq13/?ref=app
3 ответов
+ 3
Stefan Es,
I see you using var multiple times in the first 30 lines.
This is not nessacary since it can be delacred once for the whole tree.
I.E.:
var num1 = 1,
num2 = 2,
num3 = 3,
num4 = 4;
if you make the variable global, you can use it anywhere👍
var num1, num2, num3, num4;
num1 = 1;
num2 = 2;
num3 = 3;
num4 = 4;
Overall looks the code good, hope this helps👍
+ 3
That's awsome! I'm glad I could help out with some details👍
+ 2
yes this helps! that gives me a good motivation! now i can continue to work on it with more positive thinking..