Page 10 - JavaScript
P. 10
Right Shift (Zero fill) 114
Chapter 15: Bitwise Operators - Real World Examples (snippets) 115
Examples 115
Number's Parity Detection with Bitwise AND 115
Swapping Two Integers with Bitwise XOR (without additional memory allocation) 115
Faster multiplication or division by powers of 2 115
Chapter 16: BOM (Browser Object Model) 117
Remarks 117
Examples 117
Introduction 117
Window Object Methods 118
Window Object Properties 118
Chapter 17: Built-in Constants 120
Examples 120
Operations that return NaN 120
Math library functions that return NaN 120
Testing for NaN using isNaN() 120
window.isNaN() 120
Number.isNaN() 121
null 122
undefined and null 122
Infinity and -Infinity 124
NaN 124
Number constants 125
Chapter 18: Callbacks 126
Examples 126
Simple Callback Usage Examples 126
Examples with Asynchronous Functions 127
What is a callback? 128
Continuation (synchronous and asynchronous) 128
Error handling and control-flow branching 129
Callbacks and `this` 130

