When a function is abeout to be executed, all variable and function declarations are evaluated. This is the step for the variable declarations:
8. For each VariableDeclaration and VariableDeclarationNoIn d in code, in source text order do
a. Let dn be the Identifier in d.
b. Let varAlreadyDeclared be the result of calling env’s HasBinding concrete method passing dn as the argument.
c. If varAlreadyDeclared is false, then
i. Call env’s CreateMutableBinding concrete method passing dn and configurableBindings as the arguments.
ii. Call env’s SetMutableBinding concrete method passing dn, undefined, and strict as the arguments.
That's it, there is no "else" clause for varAlreadyDeclared
being true
. Nothing happens when the variable was already declared.