Challenge: Asynchronous Language Features and Decorators

Test your understanding of asynchronous language features and decorators in TypeScript by applying your knowledge to real problems.

In this challenge, you’ll be able to test your understanding of asynchronous language features and decorators in TypeScript. You’ll apply your knowledge of these topics to solve real problems that you might encounter in your projects.

There will be two code snippets, each giving you a different challenge.

Fixing the order of execution

The callDelayedPromise function logs a message before and after it calls the delayedPromise function. However, the messages are logged in the wrong order.

Your challenge is to modify the code below so that it correctly waits for the delayedPromise function to resolve before logging the second message.

Get hands-on with 1400+ tech skills courses.