Created
September 29, 2016 20:07
-
-
Save tomtobac/15a0ef8a604eaa100ec3b9fcbcce536a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fetch(`https://restcountries.eu/rest/v1/all`) | |
.then((res) => { | |
return res.json() | |
}) | |
.then((values) =>{ | |
let array = values | |
.map(x => {return {name: x.name, code: x.alpha3Code};}) | |
console.log(array.length) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment