For legacy code, yes.
But now, if you target modern browsers, you can build a whole web app using only let, and not be bothered about var and the old scope system at all.
For legacy code, yes.
But now, if you target modern browsers, you can build a whole web app using only let, and not be bothered about var and the old scope system at all.