````javascript
function shape(){
for(var i=-3; i<=3; i++){
for(var n=-3; n<3; n++){
if(Math.abs(i)+Math.abs(n)<=3){
document.write('*')
}else{
document.write(" ")
}
}
document.write('<br>')
}
}
shape()
````
打印三角形
最新推荐文章于 2022-04-07 09:09:17 发布