Just thought I’d share a different solution to the 10 Stars challenge. It works and I didn’t have to use a nested for-loop.
function showStars(rows) {
let stars = "";
for (let i = 1; i <= rows; i++) {
if (i <= rows) {
console.log((stars += "*"));
}
}
}
showStars(6);