Description: Write a function that accepts a number n and returns * for n number of times
function star(n) {
}
console.log(star(3)); // ***
function star(n) {
let result = "";
for (let i = 1; i <= n; i++) {
result += "*";
}
return result;
}
console.log(star(3));
Be careful about the way of ouput, if it's print -> console.log; if it's return -> return
![[MTR04] W2 D14 練習四:請寫出一個叫做 star 的 function 並且接受一個參數 n,能回傳 n 個 *。](https://static.coderbridge.com/images/covers/default-post-cover-1.jpg)

