You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 8, 2023. It is now read-only.
<td>Joins two or more arrays, and returns a copy of the joined arrays</td><td><code>let ${1:newArray} = ${2:array1}.concat(${3:array2})<br>$0<br></code></td>
57
-
58
-
</tr><tr>
59
-
<td>array copyWithin</td>
60
-
<td>Array.prototype.copyWithin</td>
61
-
<td>Copies array elements within the array, to and from specified positions. Syntax: array.copyWithin(target, start, end).</td><td><code>${1:array}.copyWithin(${1:target}, ${2:start}, ${3:end});<br>$0<br></code></td>
62
-
63
-
</tr><tr>
64
-
<td>array every</td>
65
-
<td>Array.prototype.every</td>
66
-
<td>Checks if every element in an array pass a test.</td><td><code>let ${1:boolean} = ${2:array}.every((${3:item}) => {<br> return $4<br>}<br>$0<br></code></td>
67
-
68
-
</tr><tr>
69
-
<td>array fill</td>
70
-
<td>Array.prototype.fill</td>
71
-
<td>Fill the elements in an array with a static value.</td><td><code>${1:array}.fill(${1:target}, ${2:start}, ${3:end});<br>$0<br></code></td>
72
-
73
-
</tr><tr>
74
-
<td>array filter</td>
75
-
<td>Array.prototype.filter</td>
76
-
<td>Creates a new array with every element in an array that pass a test</td><td><code>let ${1:newArray} = ${2:array}.filter((${3:item}) => {<br> return $4<br>}<br>$0<br></code></td>
77
-
78
-
</tr><tr>
79
-
<td>array find</td>
80
-
<td>Array.prototype.find</td>
81
-
<td>Returns the value of the first element in an array that pass a test.</td><td><code>let ${1:result} = ${2:array}.find((${3:item}) => {<br> return $4<br>}<br>$0<br></code></td>
82
-
83
-
</tr><tr>
84
-
<td>array findIndex</td>
85
-
<td>Array.prototype.findIndex</td>
86
-
<td>Returns the index of the first element in an array that pass a test</td><td><code>let ${1:result} = ${2:array}.findIndex((${3:item}) => {<br> return $4<br>}<br>$0<br></code></td>
87
-
88
-
</tr><tr>
89
-
<td>array includes</td>
90
-
<td>Array.prototype.includes</td>
91
-
<td>Check if an array contains the specified element. It is case sensitive.</td><td><code>let ${1:boolean} = ${2:array}.includes(${3:element}, ${4:start})<br>$0<br></code></td>
92
-
93
-
</tr><tr>
94
-
<td>array indexOf</td>
95
-
<td>Array.prototype.indexOf</td>
96
-
<td>Search the array for an element and return its position.</td><td><code>let ${1:index} = ${2:array}.indexOf(${3:item}, ${4:start})<br>$0<br></code></td>
97
-
98
-
</tr><tr>
99
-
<td>array map</td>
100
-
<td>Array.prototype.map</td>
101
-
<td>Creates a new array populated with the results of calling the provided function on every element in the array.</td><td><code>let ${1:newArray} = ${2:array}.map((${3:item}) => {<br> return $4<br>}<br>$0<br></code></td>
102
-
103
-
</tr><tr>
104
-
<td>array push</td>
105
-
<td>Array.prototype.push</td>
106
-
<td>Add new items to the end of an array.</td><td><code>${1:array}.push((${2:items});<br>$0<br></code></td>
107
-
108
-
</tr><tr>
109
-
<td>array reduce</td>
110
-
<td>Array.prototype.reduce</td>
111
-
<td>Reduce the values of an array to a single value (going left-to-right).</td><td><code>let ${1:newArray} = ${2:array}.reduce((accumulator, currentValue) => {<br> return $4<br>}<br>$0<br></code></td>
112
-
113
-
</tr><tr>
114
-
<td>array reduceRight</td>
115
-
<td>Array.prototype.reduceRight</td>
116
-
<td>Reduce the values of an array to a single value (going left-to-right).</td><td><code>let ${1:newArray} = ${2:array}.reduceRight((accumulator, currentValue) => {<br> return $4<br>}<br>$0<br></code></td>
117
-
118
-
</tr><tr>
119
-
<td>array slice</td>
120
-
<td>Array.prototype.slice</td>
121
-
<td>Selects a part of an array, and returns the new array.</td><td><code>let ${1:newArray} = ${2:array}.slice(${3:start}, ${4:end});<br>${0}<br></code></td>
122
-
123
-
</tr><tr>
124
-
<td>array some</td>
125
-
<td>Array.prototype.some</td>
126
-
<td>Checks if any of the elements in an array pass a test.</td><td><code>let ${1:result} = ${2:array}.some((${3:item}) => {<br> return $4<br>}<br>${0}<br></code></td>
127
-
128
-
</tr><tr>
129
-
<td>array splice</td>
130
-
<td>Array.prototype.splice</td>
131
-
<td>Adds/Removes elements from an array.</td><td><code>${1:array}.splice(${3:index}, ${4:howManyToRemove}, ${5:newItems});<br>${0}<br></code></td>
132
-
133
-
</tr><tr>
134
-
<td>array unshift</td>
135
-
<td>Array.prototype.unshift</td>
136
-
<td>Adds new elements to the beginning of an array, and returns the new length.</td><td><code>${1:array}.unshift(${3:items});<br>${0}<br></code></td>
137
-
138
-
</tr><tr>
139
-
<td>array destructure</td>
140
-
<td>Array destructure</td>
141
-
<td>Assign values from array elements to new variables using destructuring.</td><td><code>const [${1:variables}] = ${2:arrayName};<br>$0<br></code></td>
142
-
</tr><tr>
143
-
144
-
<td>json parse</td>
145
-
<td>json parse</td>
146
-
<td>Parses a JSON string and returns a JavaScript object.</td><td><code>let ${1:obj} = JSON.parse(${2:string});<br> $0</code></td>
147
-
148
-
</tr><tr>
149
-
<td>json stringify</td>
150
-
<td>json stringify</td>
151
-
<td>Convert a JavaScript object to a JSON string.</td><td><code>let ${1:string} = JSON.parse(${2:obj});<br/>$0</code></td>
152
-
153
-
</tr></tbody></table>
51
+
<table>
52
+
<thead>
53
+
<tr>
54
+
<th>Prefix</th>
55
+
<th>Description</th>
56
+
<th>Body</th>
57
+
</tr>
58
+
</thead>
59
+
<tbody>
60
+
<tr>
61
+
<td>array concat</td>
62
+
<td>Joins two or more arrays, and returns a copy of the joined arrays</td>
1. The extension is listed in the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=robole.javascript-snippets) and [Open VSX Marketplace](https://open-vsx.org/extension/robole/markdown-snippets) where you can download or install it directly.
165
+
1. The extension is listed in the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=robole.javascript-snippets) and [Open VSX Marketplace](https://open-vsx.org/extension/robole/javascript-snippets) where you can download or install it directly.
158
166
1. From the Command-line: Run the command `code --install-extension robole.javascript-snippets`.
159
167
160
168
## FAQ
@@ -203,13 +211,15 @@ The `args.name` property <u>must exactly match</u> the snippet name.
203
211
204
212
You can read my comprehensive guide on Snippets on FreeCodeCamp: [Visual Studio Code Snippets – the Definitive VS Code Snippet Guide for Beginners](https://www.freecodecamp.org/news/definitive-guide-to-snippets-visual-studio-code/). It's not just for beginners! 😉
205
213
206
-
## Show gratitude
214
+
## Show appreciation
207
215
208
-
If you are happy with the extension, please star the repo, and leave a review to help others find it. 🌟🌟🌟🌟🌟
216
+
If you are happy with the extension: please star the repo 🌟, and [leave a review in the visual studio marketplace](https://marketplace.visualstudio.com/items?itemName=robole.marky-stats&ssr=false#review-details) to help others find it. 🌟🌟🌟🌟🌟
209
217
210
-
You can [buy me a coffee](https://ko-fi.com/roboleary) if you would like to enable me to make more great open-source software and tutorials. ☕🙏
218
+
You can show your appreciation by [buying me a coffee or sponsoring me](https://ko-fi.com/roboleary). This will offer me encouragement to continue, and will provide a path to dedicating more time to open-source in the future.
211
219
212
-
[](https://ko-fi.com/roboleary)
220
+
<palign="center">
221
+
<ahref="https://ko-fi.com/roboleary"><imgsrc="img/coffee.png"alt="buy me a coffee"></a>
0 commit comments