I am using JS from quite a time now but still get stuck in some places with very basic concepts. Recently going through some basic questions I got stuck with this one
var employeeId = 'abc123';
function foo() {
employeeId = '123bcd';
return;
function employeeId() {}
}
foo();
console.log(employeeId);
O/P : abc123
Can someone explain how the output is abc123. It might be a very basic question but any help will be appreciated.