Indian Institute of Technology Madras
BS Degree Programme · Examination & Study Paper
Modern Application Development II
Promises, async/await & event loop
Examination Instructions & Guidelines
- Solve on notebook/paper first before checking solutions.
- MCQ: Exactly 1 option is correct. Negative marking applies.
- Scientific calculator allowed for all calculations.
- Official answer key is sealed at the end of this sheet.
End Term · 31 Aug 2025 (FN)End Term
- Q1MCQ3 Marks·Choose one option

- AR P Q S
- BP R S Q
- CR P S Q
- DR S P Q
- Q2MCQ3 Marks·Choose one option

- A

- B

- C

- D

- A
- Q3MCQ4.5 Marks·Choose one option

- A

- B

- C

- D

- A
- Q4MCQ4.5 Marks·Choose one option

- A

- B

- C

- D

- A
- Q5MCQ4.5 Marks·Choose one option

- AResult: null
- BError: HTTP 404, Result: null
- CError: HTTP 404
- DUnhandled promise rejection
End Term · 31 Aug 2025 (AN)End Term
- Q6MCQ3 Marks·Choose one option

- AR P Q S
- BP R S Q
- CR S P Q
- DR P S Q
- Q7MCQ3 Marks·Choose one option
Consider the following javascript program.
What will be the output of the above program on the browser’s console?- A

- B

- C

- D

- A
Read the passage below, then answer Q8–Q9
Prashant and Nikita are creating a quiz question paper collaboratively. They are each working on different sections — and complete their tasks in parallel. Meanwhile, Mayur is enjoying a single- player game that finishes when the game loop ends.
To compare productivity:
● If Prashant and Nikita (together) finish faster than Mayur, the winner is "Team".
● If Mayur finishes faster, he wins.
● If both take the same time, Mayur wins by default.
You are simulating this scenario in the browser.Prashant and Nikita are represented using parallel Promises. Mayur is represented using a single Promise. The frontend must calculate who finishes first using asynchronous logic, and display the result.

Based on the above data, answer the given subquestions.
Q8MCQ3 Marks·Choose one optionIf Prashant and Nikita finish together in 3 seconds (since Promise.all waits for both), and Mayur finishes in 4 seconds, who wins?
- AMayur
- BTeam
- CNikita
- DRace condition prevents output
- Q9MCQ3 Marks·Choose one option
The Team takes 5 seconds in total. Mayur takes 2 seconds. According to the logic of app2.js, who is the winner?- AMayur
- BTeam
- CNikita
- DError due to async logic
Quiz 2 · 3 Aug 2025 (AN)Quiz 2
- Q10MCQ3 Marks·Choose one option

- ATotal Score: 80
- BTotal Score: 90
- CTotal Score: 120
- DTotal Score: NaN
- Q11MCQ3 Marks·Choose one option

- A

- B

- C

- D

- E

- A
End Term · 22 Dec 2024 (FN)End Term
- Q12MCQ3 Marks·Choose one option

- AStart Inside Timeout Inside Promise End
- BStart Inside Promise Inside Timeout End
- CStart End Inside Timeout Inside Promise
- DStart End Inside Promise Inside Timeout
- Q13MCQ3 Marks·Choose one option
What will be the output on the console?- Aerror4
- B7
- Cerror
- Dundefined
- Q14MCQ3 Marks·Choose one option

- ABegin, Start, 5, End, Finish
- BBegin, Finish, Start, 5, End
- CBegin, Finish, Start, End, 5
- DBegin, Start, Finish, 5, End
- Q15MCQ2 Marks·Choose one option
Which of the following statements is false when using the “async” and “await” keywords in JavaScript?
- AThe “await” keyword can only be used inside an async function.
- BThe “await” keyword pauses the execution of the surrounding async function until the promise resolves.
- CThe async functions always return a promise, even if the return value is not a promise.
- DThe async functions run synchronously, but their await statements execute asynchronously.
End Term · 22 Dec 2024 (AN)End Term
- Q16MCQ3 Marks·Choose one option
What will be the output on the console?- A7
- Berror
- Cundefined
- Derror4
- Q17MCQ3 Marks·Choose one option

- ABegin, Start, 5, End, Finish
- BBegin, Start, Finish, 5, End
- CBegin, Finish, Start, 5, End
- DBegin, Finish, Start, End, 5
- Q18MCQ3 Marks·Choose one option

- A

- B

- C

- D

- A
- Q19MCQ2 Marks·Choose one option
Which of the following statements is false when using the “async” and “await” keywords in JavaScript?
- AThe “await” keyword can only be used inside an async function.
- BThe async functions run synchronously, but their await statements execute asynchronously.
- CThe “await” keyword pauses the execution of the surrounding async function until the promise resolves.
- DThe async functions always return a promise, even if the return value is not a promise.