Skip to content
dreamcode
dreamcode
Lesson
Practice · Async & await
  1. Predict
  2. Arrange
  3. Fill in
+20 XP on finish
PREDICT · READ BEFORE YOU WRITE

What order are the values printed to the console?

Trace the program the way the computer would, then make your call before running anything.

const getAltitude = async () => 8000;
const run = async () => {
  console.log('Start');
  const val = await getAltitude();
  console.log(val);
};
run();
console.log('End');