WelcomeUser Guide
ToSPrivacyCanary
DonateBugsLicense

©2024 Poal.co

1.5K

(post is archived)

[–] 1 pt

Var is legacy for defining variables in Javascript I believe. Not sure how many languages use var.

[–] 0 pt (edited )

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.

[–] 0 pt

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.

[–] 0 pt

GDScript (Godot's language) uses the var keyword