I noticed that functions behave differently on Safari and Chrome, is there any reason?
I don't need a solution, I just would understand why this happens and if it is a bug or whatelse. Here's how you can reproduce it. You'll see different values in Chrome's console and Safari's console.
const foo = 10;
{
const foo = 50;
function logFoo1(){
console.log(foo)
}
const logFoo2 = function(){
console.log(foo)
}
logFoo1();
logFoo2();
}
On safari logFoo1() will prompt 10, on Chrome 50.