Home > Article > Web Front-end > JavaScript loop practice method of printing triangles, factorials, and multiplication tables
( i = 1 ; i <= 3 ; i++( x = 1; x <= i; x++'*''<br>'
Find the sum of factorials 1! +2! +3! +4! +...+N!
n=prompt('输入' sum=0( x = 1;x <=n ; x++ factorial=1( y=1; y <= x; y++*=factorial(y-1)*yrrree
9*9 multiplication table printing
+=rrree
The above is the detailed content of JavaScript loop practice method of printing triangles, factorials, and multiplication tables. For more information, please follow other related articles on the PHP Chinese website!