In lines 6 and 7 we declare the variables i and s initializing them with the initial value (in both cases equal to 1), block (3) of the discussed algorithm.
The while statement on line 8 is equivalent to the selection block (4) in our algorithm. The statement on the same line after the condition succinctly writes block (5). s*=i++ ; this notation means that variable s will be assigned its old value multiplied by the value of variable i, and then the value of variable i will be increased by 1. These statements will be executed as long as the condition in the while statement is met, i.e. as long as i is less than or equal to When n is continuously incremented and becomes greater than n, we go to the statement after the while loop, starting on line 9, where the result (6) is printed.
The </script> tag from line 10 terminates the program (end of algorithm block (9)).
Then, in lines 11 and 12, we close the </body> and </html> sections.