The Modern JavaScript Bootcamp (2019) - Async/Await Challenge

The Modern JavaScript Bootcamp (2019) - Async/Await Challenge

Assessment

Interactive Video

Information Technology (IT), Architecture

University

Hard

Created by

Quizizz Content

FREE Resource

The video tutorial covers the process of converting regular JavaScript functions to async functions using the async/await syntax. It includes challenges that require converting 'getCountry' and 'getLocation' functions, ensuring no changes are needed in the main application code. The tutorial also guides on creating a new function 'getCurrentCountry' that combines async functions to simplify code. Testing and optimization techniques are discussed to ensure the new async functions work as expected.

Read more

10 questions

Show all answers

1.

OPEN ENDED QUESTION

3 mins • 1 pt

What are the two steps required to convert the 'get country' function to an async function?

Evaluate responses using AI:

OFF

2.

OPEN ENDED QUESTION

3 mins • 1 pt

What is the significance of using 'await' with the fetch call in the async functions?

Evaluate responses using AI:

OFF

3.

OPEN ENDED QUESTION

3 mins • 1 pt

What should be done if the response status is not 200 in the 'get country' function?

Evaluate responses using AI:

OFF

4.

OPEN ENDED QUESTION

3 mins • 1 pt

Explain how the 'await' operator is used in the context of the 'get country' function.

Evaluate responses using AI:

OFF

5.

OPEN ENDED QUESTION

3 mins • 1 pt

What changes were made to the 'get location' function to convert it to an async function?

Evaluate responses using AI:

OFF

6.

OPEN ENDED QUESTION

3 mins • 1 pt

Describe the purpose of the new function 'get current country'.

Evaluate responses using AI:

OFF

7.

OPEN ENDED QUESTION

3 mins • 1 pt

In what way does the new async function simplify the code compared to the previous implementation?

Evaluate responses using AI:

OFF

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?