Skip to main content
1 of 2
dwana
  • 551
  • 4
  • 8

Javascript, 83

Not to happpy about this one

n=9;r='';for(i=1;i<n+2;i++){for(a=1;a<i;a++){r+=a+' '}r=r.slice(0,-1)+'\n'}alert(r)

Pretty straight forwards

r=''; so javascript doesn't add the value as numbers

r.slice(0,-1)+'\n'remove last space and add a line end

dwana
  • 551
  • 4
  • 8