3 ms·
I would assume you get a compile-time error because you are declaring 'foo' twice. I guess you are right that the language is getting more complex because you
by olavk 12y ago
I would assume you get a compile-time error because you are declaring 'foo' twice.
I guess you are right that the language is getting more complex because you are introducing a new way of declaring variables. However the added complexity in the language means you can write code which is less complex and error prone (if you consistently use 'let' instead of 'var'), and I think this is a fair trade-off given that backwards compatibility must be preserved.