JavaScript Tutorial ✦
then() Method
Used to specify functions called when a promise settles.
fetch('https://api.example.com/data')
.then(response => response.json())
.then(data => console.log(data));
Used to specify functions called when a promise settles.
fetch('https://api.example.com/data')
.then(response => response.json())
.then(data => console.log(data));