Javascript function returns NaN

Printable View