new Promise((resolve) => { var a = 1; resolve(a); }).then((data) => { console.log(data); return data + 1; }).then((data) => { console.log(data); })