Home / Javascript Tips Generated By ChatGPT / Using Promise for Asynchronous Operations in Javascript Promises are used for asynchronous computations. Source Code let promise = new Promise((resolve, reject) => { setTimeout(() => resolve('Data loaded'), 2000); });