
The JavaScript code is placed at the left and its order of execution is at the right. There are seven lines of code. The code block is labeled This doesn't work ellipsis why not question mark.
Line 1: StartCommand let EndCommand fetchedData semicolon, at indentation level 0. Execution Order: 1. Line 2: fetch open parenthesis u r l close parenthesis, at indentation level 0. Execution Order: 2. Line 3: dot then open parenthesis open parenthesis resp close parenthesis equals close angle bracket resp dot json open parenthesis close parenthesis close parenthesis, at indentation level 1. Execution Order: 4. Line 5: dot then open parenthesis data equals close angle bracket open curly brace, at indentation level 1. Line 4: fetchedData equals data semicolon, at indentation level 1. Execution Order: 5. Line 3 to Line 5 is labeled Remember that fetches are asynchronous ellipsis the data will be received in the future. Line 6: close curly brace close parenthesis semicolon, at indentation level 1. Line 7: displayData open parenthesis fetchedData close parenthesis semicolon, at indentation level 0. Execution Order: 3. Note: fetchedData will be undefined when line 7 is executed. An arrow labeled Solution: move the call into the second then open parenthesis close parenthesis handler points from Line 7 to the position below line 5.
Back