Created
April 4, 2019 08:43
-
-
Save gisderdube/ffb841c3b1a4f68d74386e3c7d3d4533 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
function logCountry({name, code, language, currency, population, continent}) { | |
let msg = `The official language of ${name} ` | |
if(code) msg += `(${code}) ` | |
msg += `is ${language}. ${population} inhabitants pay in ${currency}.` | |
if(contintent) msg += ` The country is located in ${continent}` | |
} | |
logCountry({ | |
name: 'Germany', | |
code: 'DE', | |
language 'german', | |
currency: 'Euro', | |
population: '82 Million', | |
}) | |
logCountry({ | |
name: 'China', | |
language 'mandarin', | |
currency: 'Renminbi', | |
population: '1.4 Billion', | |
continent: 'Asia', | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment