guys im typing a piece of java script code which is surely wrong,but im not receiving any error message which i should receive,can you please explain why error message is not shown to me?
js code is
document.write("num.toExponential() is " + num.toExponential());
alert("num.toExponential(4) is " + num.toExponential(4)); //displays 7.7123e+1
alert("num.toExponential(2) is " + num.toExponential(2)); //displays 7.71e+1
alert("77.1234.toExponential() is " + 77.1234.toExponential()); //displays 7.71234e+1
alert("77 .toExponential() is " + 77 .toExponential()); //displays 7.
this should display an error which it is not showing,
also output is not shown to me so there is error which itself isnt shown to me,
what should i do to see that error ?
if i change value of num to some number it works properly and shows me output .
If you want to see Javascript errors, I suggest you use something like firebug, wich not only allows to see the errors but also to debug your code.
In Chrome, you just need to go to Tools > Development Tools. This will open a window on the lower side of your screen where you will se errors and be able to debug.