loading an image on web browser using Promise()
The code you are showing introduces an asynchronous primitive, Promise, which can be passed around and used to access a resource that hasn’t been populated yet. In this case, you want an Image that is fully loaded and has image data that you can use. However, you can’t access the image data until a network … Read more