Exercise 15.1

This commit is contained in:
Karan
2021-11-24 21:35:04 +05:30
committed by GitHub
parent f0b8e483a9
commit 1b7f0e86dd
+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}`);
});
})