re initializing const throws error which is unable to catch

# Boopathi Rajaa (10 years ago)

jsbin.com/quvujecuro/5/edit?html,js,console

Is it the problem with implementation or am I doing something wrong here in terms of philosophy that redeclaring should throw independent of try..catch block around it ?

# Kevin Smith (10 years ago)

It is a compile-time error to have a var declaration to conflict with or shadow a block scope declaration.