لماذا لم ينجح هذا الكود؟
var n; do { write("Enter number of lines: "); n = read(); } while (n<=0 || isNaN(n)); if (n%2 == 0) { n++; } for (var i=1;i<=n;i++) { if (i<n/2) { for(var k=1;k<=(n/2)/(i+1);k++) { write(" "); } for(var j=1;j<=i;j++) { write("*"); } } else { for(var k=1;k<=n+i-8;k++); { write(" "); } for(var j=1;j<=n-i+1;j++); { write("*"); } } write("\n"); }