11 lines
198 B
JavaScript
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 = "";
|
|
}
|
|
}
|