DEV Community

Discussion on: JavaScript beginner help

 
alvaromontoro profile image
Alvaro Montoro

The variables will only work in the function/block where they were defined. So if you want to use it somewhere else, you'll need to redefine it or make it global.

Thread Thread
 
roxor profile image
roxor • Edited

I get it, thank you for the explanation you help me a lot.
When I get a job, from my first paycheck I will buy you a coffee.

thank you one more time. Cheers!