- Declare variables called
country
,continent
andpopulation
and assign their values according to your own country (population in millions) - Log their values to the console
- Declare a variable called
language
and set the value to the language spoken in your country - Declare a variable called
onCoast
and set the value to a boolean value indicating if your country has a coast or not
- Half the population of your country
- Increase the population by 1 and log the result to the console
- Finland has a population of 6 million. Does your country have more people than Finland
- The avarage population of a country is 33 million using comparions operators is your countries population have less people than the average country
- Based on the varaibles you created create a variable
description
which contains a string with this format 'YOURCOUNTRY is in YOURCONTINENET and its YOURPOPULATION million people speak YOURLANGUAGE'
- if your countries population is greater than 33 million, log a string like this to the console 'YOURCOUNTRY's population is above average' otherwise, log a string like 'YOURCOUNTRY's population is YOURPOPULATION, bellow average'
- Lets saying Ahmed is looking for a new country to leave in. He wantes to live in a country with a population less than 50 million and is not on the coast. Write a if statement to help Ahmed see if your country fits the conditions
- If your country is the right country log a string like this: 'you should live in YOURCOUNTRY!' if not log 'YOURCOUNTRY does not meet your criteria :(' (NOTE: if your country doesnt meet the criteria change some variables to make sure the codition is working properly)
- Usee an if & else statements to log the followning string for the given 'language': chinese or mandarin: 'MOST number of native speakers' spanish: '2nd place in number of native speakers' english: '3rd place' hindi: 'Number 4' arabic: '5th most spoken language' for all other simply log 'Great languages too :)'