```
var a=10;
if(a===10){
  console.log(a);
  function a (){}
  console.log(a);
}

```

Since, if condition is true then why value of both console.log is coming as function in chrome v58 and coming as 10 in IE 8? Please refer to the screenshot of Chrome and IE8 console output.

Chrome:

[![enter image description here](https://i.stack.imgur.com/H9Xpn.png)](https://i.stack.imgur.com/H9Xpn.png)

IE 8:

[![enter image description here](https://i.stack.imgur.com/S7ZOE.jpg)](https://i.stack.imgur.com/S7ZOE.jpg)