📅  最后修改于: 2022-03-11 15:01:30.435000             🧑  作者: Mango
// Downward Triangle Star Pattern in JavaScript
let numberDown = 5;
let stringDown = '';
for (let i=1; i<=numberDown; i++){
for(let j=i; j<=numberDown; j++){
stringDown += '*';
}
stringDown += '\n';
}
console.log(stringDown);