
Beginner's Introduction to Promises in JavaScript
·2 mins
Introduction # Promise is a language feature for asynchronous programming in JavaScript.
As JavaScript is single threaded, if you are doing something which waits for I/O, you create a Promise for that task. This task could be waiting for an API call from Twitter for example, or reading a file from a filesystem), and you let it run without getting in the way of normal execution flow.