@RichieHindle , , . ( ) , function, ; , javascript.
, :
var a;
function a(){
alert("1");
}
a = function(){
alert("2");
}
a();
- , , a a, . , Javascript . - Javascript .
This is why many JavaScript developers and style guides suggest declaring your variables at the top of the field and not rely on the side effects of lifting, as you (or someone else working on your code) may be in the shadow and re-assigning the variable, previously announced in the same area.
source
share