Skip to content

fikrcamp/js-fundamentals-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Variables and Values exercise

  1. Declare variables called country, continent and population and assign their values according to your own country (population in millions)
  2. Log their values to the console
  3. Declare a variable called language and set the value to the language spoken in your country
  4. Declare a variable called onCoast and set the value to a boolean value indicating if your country has a coast or not

Basic operators exercise

  1. Half the population of your country
  2. Increase the population by 1 and log the result to the console
  3. Finland has a population of 6 million. Does your country have more people than Finland
  4. The avarage population of a country is 33 million using comparions operators is your countries population have less people than the average country
  5. 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 & Else statements

  1. 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'

Logical Operators

  1. 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
  2. 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)

If & else Statements

  1. 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 :)'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published