Stats
29,621
reputation
488k
reached
220
answers
51
questions
Loading…
About
How to help Ukraine
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 need another array where each item is based on the first one.flatMap- like.mapbut 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..whileloops if the problem can't (or doesn't need to) fit into one of the above
- Using regular expressions for doing "something with text" instead of parsing, simple string manipulation, basic arithmetic, etc.
- Generating code as string
- XY problems
- "Quotes that are not quotes"
- Unformatted code
Badges
View all badges
9
gold badges
-
Lifeboat
× 2Oct 10 -
PopulistApr 9
-
ElectorateMay 30, 2021
124
silver badges
-
SportsmanshipFeb 3, 2023
-
EpicMay 28
-
InquisitiveNov 19, 2024
198
bronze badges
-
announcementFeb 19
-
tagsApr 3
-
bugMay 29
Top tags
View all tags3,390
Score
182
Posts
67
Posts %
1,104
Score
34
Posts
13
Posts %
412
Score
35
Posts
13
Posts %
353
Score
22
Posts
8
Posts %
293
Score
40
Posts
15
Posts %
266
Score
21
Posts
8
Posts %

