var is allow duplicate declaration
var
Unlike var, let is an ES2015 specification. The specification says:
let
Redeclaring the same variable within the same function or block scope raises a SyntaxError.
This is to improve scoping over vanilla var.