Strona główna › Pytania INF.04 › Pytanie 376
INF.04 · pytanie #376
Co zostanie wyświetlone po wykonaniu poniższego kodu JavaScript? const promise = new Promise((resolve, reject) => {setTimeout(() => {resolve('success'); },1000); });promise .then(res => {console.log(res);return 'first then'; }) .then(res => {console.log(res); });
- Asuccess, first then
- Bsuccess
- Cfirst then, success
- Dfirst then
Poprawna odpowiedź: A. success, first then
Kliknij odpowiedź, którą uważasz za poprawną.