Page 8 - JavaScript
P. 8
Arrow functions as a constructor 85
Chapter 8: Async functions (async/await) 86
Introduction 86
Syntax 86
Remarks 86
Examples 86
Introduction 86
Arrow function style 87
Less indentation 87
Await and operator precedence 87
Async functions compared to Promises 88
Looping with async await 90
Simultaneous async (parallel) operations 91
Chapter 9: Async Iterators 93
Introduction 93
Syntax 93
Remarks 93
Useful Links 93
Examples 93
Basics 93
Chapter 10: Automatic Semicolon Insertion - ASI 95
Examples 95
Rules of Automatic Semicolon Insertion 95
Statements affected by automatic semicolon insertion 95
Avoid semicolon insertion on return statements 96
Chapter 11: Battery Status API 98
Remarks 98
Examples 98
Getting current battery level 98
Is battery charging? 98
Get time left until battery is empty 98

