diff --git a/Chapter 15/Exercise 15.1 b/Chapter 15/Exercise 15.1 new file mode 100644 index 0000000..4b16f2e --- /dev/null +++ b/Chapter 15/Exercise 15.1 @@ -0,0 +1,18 @@ +[ + { + "name": "Learn JavaScript", + "status" : true + }, + { + "name": "Try JSON", + "status" : false + } +] + +const url = "list.json"; +fetch(url).then(rep => rep.json()) +.then((data) => { + data.forEach((el) => { + console.log(`${el.name} = ${el.status}`); + }); +})