문제

다음 그림 처럼 별을 찍어라

 

풀이

for (i = 1; i < 6; i++) {
  rst = ' '.repeat(5-i) + '*'.repeat(i*2-1)
  console.log(rst)
}
복사했습니다!