Javscript tips and tricks

My personal cheatsheet and things I love about JS. List will keep growing with time.

This is a personal list gathered from different JS resources

1.console.time(‘Tag’) -> console.timeEnd(“Tag”) is used to measure the elapsed time. Used for performance monitoring

2. Lifecycle of client side app

Page Building : Processing HTML and executing JS side by side

Event Handling: After the last HTML node is processed, the page enters the event-handling phase, in which various events are processed.

3. Event queue is separate from event processing queue to avoid unresponsive pages

4. Arrow function’s body may or may not be a block statement. In case of a block statement you have to explicitly return a value to work.

5. Triple dot operator can be used in 2 ways Rest parameter operator and Spread operator

Director Of Engineering @Paytm | Entrepreneur | Strategic leader

Director Of Engineering @Paytm | Entrepreneur | Strategic leader