JavaScript variables being called in html tags (button)?
I am following this online free course on YouTube, this is the link if you want to visit it:
“text”, but at around 2:15:00, he shows how to call javascript variables in HTML tags and log them onto the console. My problem is that It doesn’t show the variables value in the console log when I do the same as him.
for example, if I write Show amount and I have a variable in a script with a name value and a value of 0, it will show a space in the console when I click the button but for the guy, it shows the actual value (which is 0). what could be the reason? I would appreciate any help you could give regarding the matter.
i am still beginner so it will be better if it is explained in simple language