From fc0447a9e55a2e53a349c0a04ee9169bd9739987 Mon Sep 17 00:00:00 2001 From: hessaAqeel Date: Tue, 15 Jan 2019 11:15:47 +0300 Subject: [PATCH 1/2] Update --- homework1.txt | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 homework1.txt diff --git a/homework1.txt b/homework1.txt new file mode 100644 index 0000000..aa5b2c4 --- /dev/null +++ b/homework1.txt @@ -0,0 +1,34 @@ +1- +var numOfChildren = 2; +var partnerName = "Sara"; +var geoLocation = "Riydh"; +var jobTitle = "Web Developer"; + +console.log("You will be a "+ jobTitle + " in " + geoLocation + " and married to " + partnerName + " with " + numOfChildren + " kids "); + +2- I faced an issue with this one * +var currentYear = 2019; +var birthYear = 1995; + +var age = currentYear - birthYear; +undefined +console.log("they are " + age); + + +3- : + +var myAge = 24 ; +var maxAge = 40 ; +var snackPerYear = 2 * 365; +var totalSnacks =( maxAge - myAge ) * snackPerYear; + +console.log("You will need " + totalSnacks + " to last you until the ripe old age of " + maxAge); + + +5 : + +var tempinCelsius = "20°"; +var tempinFahrenheit= "68 degrees Fahrenheit"; + +console.log( tempinFahrenheit + " is " + tempinCelsius ); + From 2987e3b2dc2731517c9859a8e12659e6419a2ace Mon Sep 17 00:00:00 2001 From: hessaAqeel Date: Tue, 15 Jan 2019 11:26:44 +0300 Subject: [PATCH 2/2] update *.* --- homework1.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homework1.txt b/homework1.txt index aa5b2c4..3740443 100644 --- a/homework1.txt +++ b/homework1.txt @@ -27,8 +27,8 @@ console.log("You will need " + totalSnacks + " to last you until the ripe old ag 5 : -var tempinCelsius = "20°"; -var tempinFahrenheit= "68 degrees Fahrenheit"; +var tempinCelsius = 20°; +var tempinFahrenheit= tempinCelsius * 1.8 + 32; console.log( tempinFahrenheit + " is " + tempinCelsius );