Skip to content

Latest commit

 

History

History
69 lines (44 loc) · 1.98 KB

File metadata and controls

69 lines (44 loc) · 1.98 KB

Homework Week 9

Topics discussed this week:
• (re)writing data structures (in JSON)
• Async VS Sync 
• Code flow (order of execution)

Step 1: Read

Step 2: Feedback

  • Create at least 2 issues (bug / feature / code improvement) on another teams github repository. Do this in pairs.
  • Solve the issue proposed by another students in your github repo. More info here

Step 3: Pair programming promises challenge

This week you will work in a team!

So please:

Step 4: Async challenge

Deadline Saturday

  1. Rewrite the code below to Async:
1.

let sum = calculateSum(2, 6);
console.log(sum);

2.

let results = $.getJSON('http://myapi.com');
showResults(results);

3.

let sum = calculateSum(2, 6);
if (sum > 8) {
    console.log('larger than 8');
}

4.

let data = $.getJSON('http://myapi.com');
data = data.map(function (x) { return x * 8; });

writeDataToFile(data);

Step 5: Read before next lecture

Deadline Sunday morning

Go trough the reading material in the README.md to prepare for your next class

To hand in your homework, make a pull request to the original repository you forked from. Remember, our master branches are protected, you cannot push to a directly cloned repository you first have to make a fork to your own Github.