Tagged “arrays”
-
TIL mutations and how to sort without mutating javascript functional-programming arrays
Mutation isn't bad. It CAN cause side effects and ruin your life. There's times when you want to have your objects mutate. For everything else, switch to functional programming and passing the data.
-
TIL a clean way to add classes based on the page in Vue clean-code arrays vue
If your pages exist in a array, use the includes() to check.
-
TIL find() vs filter() javascript arrays
`find()` method return the first value which match from the collection. `filter()` method returns the match value from the array.
-
TIL the history of the for, forEach, and for...of loops arrays javascript
for loop came first. Then forEach. With new iterables, for...of was adopted.
-
TIL spreading an array into another array javascript arrays
So to merge an array, use the spread operator. '...' <-- that guy
-
TIL a easy way to generate a lot of fake numbers javascript arrays
You need lots of array elements. You got it.
-
TIL use JS filter like a pro javascript arrays
To remove falsy items, we use `.filter()` `(Array.prototype.filter())`
See all tags.