How to check javascript error in chrome?

I remember that whenever there is an error in JavaScript code, older version of internet explorer show me the yellow icon in the status bar to indicate that there is an error in JavaScript code. But in chrome if the JavaScript code is not working then nothing happen and there is no status bar like in previous version of internet explorer show us.

I tried the below sample code in internet explorer and chrome and the result is unexpected.

—Code Begin—

<html>
<head>
<title>Testing Javascript Error in Browser</title>
<script language=”javascript”>
function generateError()
{
var a= 25;
var b = a.value;
var c= a/b;
alert(“The value of c is” + a.v);

generateError();
</script>

</head>
<body>

<p>This is demo to show errors in chrome</p>
</body>
</html>

—- Code End—-

Here the result in Internet Explorer, where it show nothing, no error.

Internet Explorer Javascript Error


But to see the JavaScript error in Chrome, you can open JavaScript console (shortcut: Ctrl+Shift+J) from wrench tool and check the error. Here is result of above code running in Chrome:

Chrome Javascript Error