Extract City Facts
THE CHALLENGE
Create a function that takes a number as its only argument and returns true if it's less than or equal to zero, otherwise return false.
Please notice that I use print in the code instead of console.log to show the result in my built-in console below. However, you should use console.log to
show the result in your normal console
THE CODE
// week 4, day 2, challange 1 Objects
// Extract City Facts
function cityFacts(city) {
cityOutput = city.name + " has a population of " + city.population + " and is located in " + city.continent;
print(cityOutput);
// to show the result on your console use
// console.log(cityOutput)
};
cityFacts({
name: "Paris",
population: "2,140,526",
continent: "Europe",
});
cityFacts({
name: "Tokyo",
population: "13,929,286",
continent: "Asia"
})
THE EXECUTION RESULT