Hi, anyone who has read my posts will know I'm new to the whole JS scene and I just had a couple of questions...
I've been learning by following tutorials and dissecting others code. I noticed straight away that variable names have no prefix like they do in other languages, but when coding I have automatically slipped a $ into the variable name and it still works. Does this matter, or does the $ cast the variable as a certain type, like string or something?
Is it possible to refer to a variable by a variable? This sound confusing but in PHP I use $$var quite a lot. Is it possible to do anything similar in JS?
Thanks guys.
-Geeeeeeeeeeeeeeeeeeeeeeee-
I've been learning by following tutorials and dissecting others code. I noticed straight away that variable names have no prefix like they do in other languages, but when coding I have automatically slipped a $ into the variable name and it still works. Does this matter, or does the $ cast the variable as a certain type, like string or something?
Is it possible to refer to a variable by a variable? This sound confusing but in PHP I use $$var quite a lot. Is it possible to do anything similar in JS?
Thanks guys.
-Geeeeeeeeeeeeeeeeeeeeeeee-