var number = num(); // 三角形 for (let i = 0; i < number; i++) { for (let j = i; j < number - 1; j++) { document.write(" "); } for (let j = 0; j <= i; j++) {
// 平行四边形 for (let i = 0; i < number; i++) { for (let j = 0; j < number - i; j++) { document.write(" "); } for (let k = 0; k < number; k++) { document.write("* "); } document.write("<br>"); }
document.write("<br/>");
//菱形 for (let i = 1; i <= 3; i++) { for (let j = 1; j <= 3 - i; j++) { document.write(" "); } for (let j = 1; j <= i; j++) { document.write("*   "); } document.write("<br>"); }
for (let i = 1; i <= 3; i++) { for (let j = 1; j <= i; j++) { document.write(" "); } for (let j = 1; j <= 3 - i; j++) { document.write("*   "); } document.write("<br>"); } document.write("<br/>219970502-陈浩然");