A Promise is a proxy for a value not necessarily known when the promise is created. It allows you to associate handlers with an asynchronous action's eventual success value or failure reason.
In this post, let's use the Callback to read a file. Naturally, reading a file is not instantaneous; it is necessary some time to read them, and all will happen in an async way.
JavaScript offers functions that repeat a command or a group of instructions “x” times, making the developers' lives easier.