{function foo(){};foo=1;function foo(){};foo=2;}
console.log(foo); // 1
Can anyone explain why "1" is output here?
Edit: Seems there is an implementation difference, within "Chrome", "Firefox", "Nodejs" the output is "1", but within "Safari" output is "2"