Page 9 - JavaScript
P. 9
Get time left until battery is fully charged 98
Battery Events 99
Chapter 12: Behavioral Design Patterns 100
Examples 100
Observer pattern 100
Mediator Pattern 101
Command 102
Iterator 103
Chapter 13: Binary Data 106
Remarks 106
Examples 106
Converting between Blobs and ArrayBuffers 106
Convert a Blob to an ArrayBuffer (asynchronous) 106
Convert a Blob to an ArrayBuffer using a Promise (asynchronous) 106
Convert an ArrayBuffer or typed array to a Blob 107
Manipulating ArrayBuffers with DataViews 107
Creating a TypedArray from a Base64 string 107
Using TypedArrays 107
Getting binary representation of an image file 108
Iterating through an arrayBuffer 109
Chapter 14: Bitwise operators 111
Examples 111
Bitwise operators 111
Conversion to 32-bit integers 111
Two's Complement 111
Bitwise AND 111
Bitwise OR 112
Bitwise NOT 112
Bitwise XOR 113
Shift Operators 113
Left Shift 113
Right Shift (Sign-propagating) 113

