Stats
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.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 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
-
javascriptNov 6, 2020
-
MarshalDec 21, 2018
-
Copy EditorSep 30, 2019
52
silver badges
-
OutspokenMay 8, 2020
-
ConventionOct 17, 2019
-
ArchaeologistApr 12, 2022
70
bronze badges
-
ecmascript-6Jul 26, 2022
-
typescriptMay 18, 2021
-
node.jsMar 29, 2020
Top tags
View all tags
1,836
Score
767
Posts
86
Posts %
345
Score
63
Posts
7
Posts %
239
Score
129
Posts
15
Posts %
238
Score
108
Posts
12
Posts %
114
Score
43
Posts
5
Posts %
99
Score
40
Posts
4
Posts %
Top Meta posts
21
102
Top network posts
View all network posts