Create exercise 3

This commit is contained in:
LSvekis
2021-09-11 14:20:05 -04:00
committed by GitHub
parent 51da0b3c92
commit f75672e96b
+18
View File
@@ -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}`);
});
})