VLAZ
Pet peeves:
- Images posted instead of text.
- Using
.map()
(or any other array iteration method like.filter
, etc), in JavaScript for simply going through the array instead of.forEach()
or a loop`. In general, use the array methods for their purpose:.map
- I have an array, I another array where each item is based on the first one.flatMap
- like.map
but I use it when each new item also an array.filter
- I have an array, I need less of it.find
- I have an array, I need one item from it.findIndex
- I have an array, I need the index of an item.some
- I have an array, I need to check if at least one item passes a check.every
- I have an array, I need to see if all items pass a check.forEach
- I have an array, I need to do something with each item. Usually I don't want to return anything.reduce
/.reduceRight
- I have an array, I need to make it into "one value". I'll have to check if I really need to use reduce for thisfor
,for..in
,for..of
,while
,do..while
loops if the problem can't (or doesn't need to) fit into one of the above
- Using regular expressions when you need "something with text" instead of parsing, simple string manipulation, or basic arithmetic, and so on.
- Generating DOM content as a string of HTML.
- Unformatted code.
9
answers
13
questions
~54k
people reached
-
Member for 6 years, 8 months
-
373 profile views
-
Last seen 5 hours ago
Communities (45)
- Stack Overflow 16.4k 16.4k 88 gold badges3232 silver badges5050 bronze badges
- Worldbuilding 5.7k 5.7k 22 gold badges1515 silver badges4141 bronze badges
- Meta Stack Exchange 1.9k 1.9k 11 gold badge77 silver badges1919 bronze badges
- Science Fiction & Fantasy 869 869 11 gold badge88 silver badges1818 bronze badges
- Code Review 445 445 11 gold badge33 silver badges1212 bronze badges
- View network profile
Top network posts
- 170 what is the difference between const and const {} in javascript
- 71 Why would people bury their dead in tombs when they might become zombies?
- 56 Where could a vampire get blood without harming people?
- 51 What would cause a culture to keep a distinct weapon for centuries?
- 44 Backwards the migration close reason text is
- 40 Origin of genies (from lamps) having a three wish limit?
- 34 What flaw keeps the mimics out and keeps the humans in?
- View more network posts →
Top tags (30)
Score
176
Posts
18
Posts %
82
Score
136
Posts
5
Score
120
Posts
4
Badges (38)
Gold
1
Rarest
-
Nov 2
Silver
15
Rarest
-
Mar 27 '19
-
Oct 3 '19
-
Oct 23 '19
Bronze
22
Rarest
-
Apr 26
-
Mar 27
-
Apr 8