var n; do { write("Enter number of lines: "); n = read(); } while (n<1 || n>9 || isNaN(n)); for (var i=1; i<=n; i++) { for (var k=1; k<=n-i; k++) { write(" "); } for (var j=1; j<=(i*2)-1; j++) { if (j==1 || j==(i*2)-1 || i==n) { write(i); } else { write(" "); } } write("\n"); }
(
)
{
}
[
]
"
;
=
+
-
*
!
/
%
&
|