Em JavaScript há uma comportamento chamado hoisting
.
O uso de var
trazia algumas pegadinhas, como por exemplo, declarar a mesma variavel 2x usando var
var abc = 25
// ...
// ...
var abc = 99
Em JavaScript há uma comportamento chamado hoisting
.
O uso de var
trazia algumas pegadinhas, como por exemplo, declarar a mesma variavel 2x usando var
var abc = 25
// ...
// ...
var abc = 99