August 2017
Beginner
298 pages
7h 4m
English
To read the selected image, we are going to use FileReader, which allows JavaScript to asynchronously read the contents of a file (either from a file or raw data). Note the term asynchronously; it means JavaScript will not wait for the FileReader code to complete execution. JavaScript will start the execution of the next line while FileReader is still reading the file. This is because JavaScript is a single-threaded language. It means all the operations, event listeners, functions, and so on, are executing in a single thread. If JS has to wait for the completion of FileReader, then the entire JavaScript code will be paused (just like how debugger pauses the execution of the script), since everything is running ...
Read now
Unlock full access