Based on the Javacsript tutorials in Mozilla website, I came across this word
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
closed as too broad by gnat, Dynamic, Alex Feinman, ChrisF♦ Mar 26 '14 at 21:30
There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.
So, in short: never and nowhere.
The net effect here is that you have variables in use before you declare them, and that can cause confusion, especially with global-scope variables. Example:
To avoid confusion, declare your variables at the top of a function.
Is it useful?
If you prefer this:
Instead of this:
Then it is useful. Even if you don't notice it!
First example will translate to something like this: