function timeout(ms) { return new Promise((resolve, reject) => { setTimeout(resolve, ms,'done111','1'); }); } timeout(1000).then((value) => { console.log(value); });