loading...

re: Do You Still Use Var? If So Why? VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Just define it in the parent scope. It has extra line if compare with var, but I think this code is more obvious, because there is no implicit hois...

That is what I'm trying to avoid. And you could still do the same with var.

I choose to believe var's implicit hoisting is a feature and not a bug.

I agree, this is a valid use case for var if you prefer implicit hoisting.

Code of Conduct Report abuse