Var is legacy for defining variables in Javascript I believe. Not sure how many languages use var.
Var is legacy for defining variables in Javascript I believe. Not sure how many languages use var.
Prepended edit (hmmm): http://blog.niftysnippets.org/2008/03/horror-of-implicit-globals.html
What's legacy about it? I haven't kept up, and my search says you have to use it.
Apparently, it's also legal in C# beginning in version 3. I didn't know that.
Prepended edit (hmmm): http://blog.niftysnippets.org/2008/03/horror-of-implicit-globals.html
What's legacy about it? I haven't kept up, and my search says you have to use it.
Apparently, it's also legal in C# beginning in version 3. I didn't know that.
I only just started trying to pick up Javascript, but from what I've seen.. the 'let' keyword is best practice, the course I'm using says to use 'let' rather than 'var'.
I'm not sure what the difference really is though.
I only just started trying to pick up Javascript, but from what I've seen.. the 'let' keyword is best practice, the course I'm using says to use 'let' rather than 'var'.
I'm not sure what the difference really is though.
GDScript (Godot's language) uses the var keyword
GDScript (Godot's language) uses the var keyword
(post is archived)