- **`localStorage` does not automatically clear its contents when the browser is closed.
http://mohammadnazmul.blogspot.com/ https://nextleap.app/online-compiler/sql-programming
------------------------------------------------------------
A promise is an object that may produce a single value some time in the future with either a resolved value or a reason that it’s not resolved(for example, network error). It will be in one of the 3 possible states: fulfilled, rejected, or pending.
Promises are used to handle asynchronous operations. They provide an alternative approach for callbacks by reducing the callback hell and writing the cleaner code.
Promises have three states:
We need callback functions because many JavaScript actions are asynchronous, which means they don't really stop the program (or a function) from running until they're completed, as you're probably used to. Instead, it will execute in the background while the rest of the code runs.
https://www.youtube.com/watch?v=NWLyoCYEe0A