Why this program not working?

http://www.codepile.net/raw/anprlv1V.js

Hello @premang,

You have made a silly mistake in your code.
This is leading to run-time error.

I have corrected your code.


Compare the commented statement with the statement after it to understand your mistake.

Hope, this would help.
Give a like if you are satisfied.