Async HW Instructions

You should implement your program using promises. (Don't use the async and await keywords).  We will randomly select inspect programs to ensure that you used the promise syntax. 

Use the isomorphic fetch library. Remember to do a npm install. const fetch = require("isomorphic-fetch")

 

Promise Syntax 

Find the shortest path to an exit by navigating the JSON maze. Below is an example of each entry in the JSON maze. Read the JSON Object from this following endpoint https://www.cs.virginia.edu/~dgg6b/jsonMaze/enter.json

 The navigate through the maze until you find an exit. (An exit is a JSON object where the "exit" property is set to true). Return the list of path ids that correspond to the shortest path through the maze.  It is important to note that, the maze does not have any loops.


{"id":"4b03d81e-dc86-40c2-b9c4-d8d37a89ae17",
"left":"8a748d94-03d6-41e9-818c-0744605549d2",
"right":"55d86280-cdce-4910-9450-b36d5385821b",
"exit":false,
"urlLeft":"",
"urlRight":""}

The left URL can be constructed by doing  https://www.cs.virginia.edu/~dgg6b/jsonMaze/8a748d94-03d6-41e9-818c-0744605549d2.json
The Right URL can be constructed by doing https://www.cs.virginia.edu/~dgg6b/jsonMaze/55d86280-cdce-4910-9450-b36d5385821b.json
Your program should only use the promise syntax. 

Collab Submission 

To get credit for the assignment, answer the Collab quiz. It will ask you to enter the path IDs in order, from the entrance to the exit.

Complete and Continue