In Javascript variables are hoisted (float to the top) as well as functions.
Meaning you can declare them anywhere but their values won't be assigned until you hit the line where you are assigning them. This also means that you can call the variables before they are declared with (var, let, const).
You won't get an error in this instance but he values of the variables are unassigned, but they have been declared which will have an undefined value.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
In Javascript variables are hoisted (float to the top) as well as functions.
Meaning you can declare them anywhere but their values won't be assigned until you hit the line where you are assigning them. This also means that you can call the variables before they are declared with (var, let, const).
You won't get an error in this instance but he values of the variables are unassigned, but they have been declared which will have an undefined value.