Join Eve Porcello for an in-depth discussion in this video Async with fetch, part of Learning ECMAScript 6.
- [Instructor] Let's take a minute asynchronous functions…and Fetch together.…Fetch is by definition is asynchronous,…we make a request, and then we wait to get some data back.…So we're going to do just this inside of an async function…using Github request.…So here we're going to create an async function,…it's going to take in a login name and then it's going…to return a try catch block.…So this is something we haven't looked at just yet…with async functions, but try catch can make it easier…to track errors in our functions.…
So let's go ahead an define our try block here,…we're going to say var response and we're going to set…this equal to a weight and this is going to make a request…to the Github API.…So here we're going to look for HTTPS,…API.Github.com/users/, here we'll use a variable…in the template string, login name, slash followers.…
Okay, so once we have made this request,…we're going to then create a variable called Jason,…we're going to await the response being turned into Jason.…Then once we have that we're going to create another…
- What is ECMAScript?
- Transpiling ECMAScript with Babel and Babel-node
- Using the let and const keywords
- Creating strings with template strings
- Enhancing object literals
- Working with ES6 classes and class inheritance
Skill Level Intermediate
Q: The Babel API is out of date. How do I proceed with the course?
A: We are updating the course. In the meantime, you can install the babel-cli package and then install the presets that you need to follow along with the tutorials.
1. What Is ECMAScript 6 (ES6)?
2. Transpiling ES6
3. ES6 Syntax
4. ES6 Functions & Objects
5. Asynchronous Features
6. ES6 Classes
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.