[MTR04] W2 D12 練習三


Posted by Christy on 2020-07-16

練習三:寫一個能夠印出 n 個 的函式
寫一個函式 star,接收一個參數 n,並印出 n 個

(禁止使用內建函式 repeat)

star(1) 預期輸出:
*

star(5) 預期輸出:


star(10) 預期輸出:


function star(n){
 for (i = 1; i<=n; i++) {
}
console.log(star(1))

中間少了星星,應該有要擺的地方,明天繼續研究。










Related Posts

[TensorFlow Certification Day10] Time Series Completed (6hrs)

[TensorFlow Certification Day10] Time Series Completed (6hrs)

[ HTML  / CSS ] - 表單的各種設定

[ HTML / CSS ] - 表單的各種設定

Letter Combinations of a Phone Number

Letter Combinations of a Phone Number


Comments