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

Commit66f70e1

Browse files
authored
update README
1 parent238a146 commit66f70e1

File tree

1 file changed

+26
-9
lines changed

1 file changed

+26
-9
lines changed

‎README.md

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@
66
|---- | ---------
77
|1|[Generate a random number in a given range](#How-to-generate-a-random-number-in-a-given-range)|
88
|2|[Find the difference between two arrays](#How-to-find-the-difference-between-two-arrays)|
9+
|3|[Convert truthy/falsy to boolean(true/false)](#Convert_truthy/falsy_to_boolean(true/false))|
10+
|4|[Repeat a string](#Repeat_a_string)|
11+
|5|[Check how long an operation takes](#Check_how_long_an_operation_takes)|
12+
|6|[Two ways to remove an item in a specific in an array](#Two_ways_to_remove_an_item_in_a_specific_in_an_array)|
13+
|7|[Did you know you can flat an array?](#Did_you_know_you_can_flat_an_array)|
14+
|8|[Get unique values in an array](#Get_unique_values_in_an_array)|
15+
|9|[Copy Text to Clipboard](#Copy_Text_to_Clipboard)|
16+
|10|[Nested Destructuring](#Nested_Destructuring)|
17+
918

1019

1120
**[⬆ Back to Top](#table-of-contents)**
@@ -68,7 +77,8 @@ difference(firstArr, secondArr); //[3,4]
6877
console.log('difference',difference(firstArr, secondArr))
6978
```
7079

71-
#How to convert truthy/falsy to boolean(true/false)
80+
**[⬆ Back to Top](#table-of-contents)**
81+
###Convert truthy/falsy to boolean(true/false)
7282
```javascript
7383
constmyVar=null;
7484
constmySecondVar=1;
@@ -80,8 +90,8 @@ console.log( !!myVar ) // false
8090
console.log(Boolean(mySecondVar) )// true
8191
console.log(!!mySecondVar )// true
8292
```
83-
84-
#How to repeat a string
93+
**[⬆ Back to Top](#table-of-contents)**
94+
###Repeat a string
8595
```javascript
8696

8797
let aliens='';
@@ -99,7 +109,8 @@ Array(6).join('👽')
99109
//👽👽👽👽👽👽
100110

101111
```
102-
#Check how long an operation takes
112+
**[⬆ Back to Top](#table-of-contents)**
113+
###Check how long an operation takes
103114
```javascript
104115
//The performance.now() method returns a DOMHighResTimeStamp, measured in milliseconds.
105116
//performance.now() is relative to page load and more precise in orders of magnitude.
@@ -112,7 +123,8 @@ const endTime = performance.now();
112123
console.log("this doSomething took"+ (endTime- startTime)+" milliseconds.");
113124
```
114125

115-
#Two ways to remove an item in a specific in an array
126+
**[⬆ Back to Top](#table-of-contents)**
127+
###Two ways to remove an item in a specific in an array
116128

117129
```javascript
118130
//Mutating way
@@ -126,7 +138,8 @@ const newArray = nonMuatatedArray.filter((item, index) => !( index === 2 ));
126138
console.log(newArray)//['a','b','d','e']
127139
```
128140

129-
#Did you know you can flat an array?
141+
**[⬆ Back to Top](#table-of-contents)**
142+
###Did you know you can flat an array
130143

131144
```javascript
132145
constmyArray= [2,3, [4,5],[7,7, [8,9, [1,1]]]];
@@ -142,7 +155,8 @@ myArray.flat(infinity) // [2, 3, 4, 5 ,7,7, 8, 9, 1, 1];
142155

143156
```
144157

145-
#Get unique values in an array
158+
**[⬆ Back to Top](#table-of-contents)**
159+
###Get unique values in an array
146160

147161
```javascript
148162
constnumbers= [1,1,3,2,5,3,4,7,7,7,8];
@@ -164,7 +178,9 @@ const unieqNumbers4 = _.uniq(numbers)
164178
console.log(unieqNumbers4)//[1,3,2,5,4,7,8]
165179

166180
```
167-
#Copy Text to Clipboard
181+
182+
**[⬆ Back to Top](#table-of-contents)**
183+
###Copy Text to Clipboard
168184

169185

170186
```javascript
@@ -182,7 +198,8 @@ function copyToClipboard(){
182198

183199
```
184200

185-
#Nested Destructuring
201+
**[⬆ Back to Top](#table-of-contents)**
202+
###Nested Destructuring
186203

187204

188205
```javascript

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp