## Log Promises


The introduction of `Promises` as programming construct was a big step out of the call-back-hell. Together with new "async/await" syntax support, the code was became as readable and as synchronous code used to be. #CodeExampleNeeded

- synchronous code
  - control flow easy to follow in lexical structure of the code
  - dynamic behavior, log messages etc map well on lexical structure
  - Lexical Structure:
    - A
      - A1
      - A2
    - B
      - B1
      - B2
  - Dynamic Behavior:
    - A
      - A1
      - A2
    - B
      - B1
      - B2
- callbacks
  - by handing in closures / anonymous callback functions, code can express asynchronous behavior
  - the control flow can be hard to grasp both in lexical structure of the file and in the dynamic behavior
- promises and async/wait syntax
  - make code easier to understand and especially with async/await syntax as easy to read as synchronous code used to be. The code looks nearly the same, except for adding (async/await) keywords on the boundaries between chunks of synchronous code. 
  - but: at run-time the lexical structure is lost and the system behaves like a call-back hell
  - it therefore becomes hard to debug and analyze / observe
  
