JavaScript and HTML code to calculate sum of 1 to n - Practical [ SWPD 4311603 ]