Skip to content

Commit e3b728b

Browse files
authored
Add JavaScript concepts to Coding.md
Added sections for JavaScript concepts including Inverted Switch and Parallel Await.
1 parent d5a5f0d commit e3b728b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Coding.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,18 @@ minimalism and skeuomorphism
3939

4040
`ctrl + R` in Terminal will allow you to search through your command history
4141

42+
## JavaScript
43+
44+
**Inverted Switch**
45+
```
46+
switch (true) {
47+
case x > 0:
48+
case x < 0:
49+
case x == 0:
50+
}
51+
```
52+
53+
**Parallel Await**
54+
```
55+
await Promise.all( collection.map( item => doAsyncOperation(item) ) )
56+
```

0 commit comments

Comments
 (0)