Level Up Frontend
What's the Output of this Javascript Question? ⬇️ (Post 2)const myPromise = () => Promise.resolve('I have resolved!');function firstFunction() { myPromise().then(res => console.log(res)); console.log('second');}async function secondFunction() { console.log(await myPromise()); console.log('second');}firstFunction();secondFunction();------------------------------------------------------------------------------------------------------------------⭐ Watch my Series on "Javascript Machine Coding Interview Questions for Dream Job" to understand concepts from an experienced developer and clear interview to grow in your career. - youtube.com/playlist?list=PL2...#promise #javascript #interviewquestion
10 months ago | [YT] | 35
Level Up Frontend
What's the Output of this Javascript Question? ⬇️ (Post 2)
const myPromise = () => Promise.resolve('I have resolved!');
function firstFunction() {
myPromise().then(res => console.log(res));
console.log('second');
}
async function secondFunction() {
console.log(await myPromise());
console.log('second');
}
firstFunction();
secondFunction();
------------------------------------------------------------------------------------------------------------------
⭐ Watch my Series on "Javascript Machine Coding Interview Questions for Dream Job" to understand concepts from an experienced developer and clear interview to grow in your career. - youtube.com/playlist?list=PL2...
#promise #javascript #interviewquestion
10 months ago | [YT] | 35