特牛生活网

前端JS算法之打印星星_js打印五角星-CSDN博客

网友收藏
第一种(左直角)function theOutputOne(n) { let star = ''; for(let i = 0; i < n; i++) { star += '*' console.log(star) }}theOutputOne(11)第二种(右直角)function theOutputTwo(n) { let star = ''; for(let i = 0; i < n; i++) {._js打印五角星