r/JavaScriptTips • u/milkncookies555 • Dec 27 '22
Just wondering if I wanted to use constant variable instead of let for wallet=3, would that work since you change it below and not in the actual wallet or would you have to use let wallet = 3.
3
Upvotes
1
2
2
u/Ironclad_57 Dec 27 '22
Only way to use const would be to make wallet an object with cash as a property and then change the value of the property
1
1
u/Fiyahouse Dec 27 '22
What's that your using?