Moving forward I would say, don't use var anymore. Ever since 2015, the industry has been moving away from it in favor of let and const. Any time you see var in the wild, it's probably old code examples that haven't been updated in a while. If you're confused when seeing examples online, you can mentally replace them with let. Hope that helps!
thanks for the advice it help a lot!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.