The Modern JavaScript Bootcamp (2019) - A Fetch Challenge

The Modern JavaScript Bootcamp (2019) - A Fetch Challenge

Assessment

Interactive Video

Information Technology (IT), Architecture

University

Hard

Created by

Quizizz Content

FREE Resource

The video tutorial guides viewers through converting the getCountry function to use the fetch API instead of XMLHttpRequest. It outlines three main steps: implementing fetch, ensuring the function resolves with the correct country object, and updating error handling using catch. The tutorial also covers simplifying code with arrow functions and testing the changes to ensure correct functionality. The video concludes with a successful demonstration of the updated code.

Read more

7 questions

Show all answers

1.

OPEN ENDED QUESTION

3 mins • 1 pt

What are the three steps mentioned for converting 'get country' to use fetch?

Evaluate responses using AI:

OFF

2.

OPEN ENDED QUESTION

3 mins • 1 pt

Describe how the 'get country' function resolves with the country object.

Evaluate responses using AI:

OFF

3.

OPEN ENDED QUESTION

3 mins • 1 pt

How does the new 'get country' function handle errors?

Evaluate responses using AI:

OFF

4.

OPEN ENDED QUESTION

3 mins • 1 pt

What is the significance of checking the response status in the new function?

Evaluate responses using AI:

OFF

5.

OPEN ENDED QUESTION

3 mins • 1 pt

Explain how the response from fetch is processed in the new 'get country' function.

Evaluate responses using AI:

OFF

6.

OPEN ENDED QUESTION

3 mins • 1 pt

What is the purpose of using 'catch' in the new implementation?

Evaluate responses using AI:

OFF

7.

OPEN ENDED QUESTION

3 mins • 1 pt

What changes were made to the error handling mechanism in the new implementation?

Evaluate responses using AI:

OFF