2021-03-31 21:56:49 -04:00

11 lines
198 B
JavaScript

function drawTriangle(size) {
let target = "";
for (let i=0; i<size; i++){
for (let j=0; j<=i; j++){
target = target + "*";
}
console.log(target);
target = "";
}
}