# Control Flow
# conditional
- only if
- if..else
- ternary operator
# iteration
type | syntax |
---|---|
with index | traditional for |
without index | for..in |
list | item.forEach() |
Map | item.entries() |
# Switch snippet
switch vs Map object classes
- works very well with
enums
# Exception Handling
- catch nown Exceptions with
on
inside try block
# Exit on assertion failures
- to stop the chain of horrendeous things