why is it showing namechoice as undefined
so basically i'm making this thing, and when i try to use namechoice in firstStretch(), it just keeps on saying that namechoice is undefined. I have tried making namechoice global both in and out of the function, and other things, but it is not working. any suggestions?
Voters
global is for accessing variables while the code is in a function. You have to do it the other way around.
basically, here is an example:
This doesnt work
This works
but the thing is, I am only declaring namechoice in a function. should I just have that outside of a function in the code? @ChezCoder
@kbadrinath_tcsp unless you want namespace to be only in that function, yes, declare it outside.