````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()
````