Files
JavaScript-from-Beginner-to…/Chapter 15/myscript.js
T
2021-11-30 18:34:44 +05:30

10 lines
224 B
JavaScript
Vendored

let url = "people.json";
fetch(url)
.then(response => response.json())
.then(data => {
console.log(data);
data.forEach(person => {
console.log(`${person.first} ${person.last} - ${person.topic}`);
});
});