fetch('http://example.com/songs') .then(response => response.json()) .then(data => console.log(data)) .catch(err => console.error(err));
fetch('http://example.com/movies.json') .then((response) => { return response.json(); }) .then((myJson) => { console.log(myJson); });
fetch('http://example.com/movies.json') .then(response => response.json()) .then(data => console.log(data));
fetch('http://example.com/movies.json') .then((response) => { return response.json(); }) .then((data) => { console.log(data); });