Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8980e66

Browse files
authored
How to repeat a string
1 parentf533b66 commit8980e66

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

‎README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,23 @@ console.log( !!myVar ) // false
7373

7474
console.log(Boolean(mySecondVar) )// true
7575
console.log(!!mySecondVar )// true
76+
```
77+
78+
#How to repeat a string
79+
```javascript
80+
81+
let aliens='';
82+
83+
for(let i=0 ; i<6 ; i++){
84+
aliens+='👽'
85+
}
86+
//👽👽👽👽👽👽
87+
88+
Array(6).join('👽')
89+
//👽👽👽👽👽👽
7690

7791

92+
'👽'.repeat(6)
93+
//👽👽👽👽👽👽
7894

7995
```

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp