|
@@ -5,10 +5,16 @@
|
|
|
// <= - less than or equl to
|
|
// <= - less than or equl to
|
|
|
// >= - greater than or equal to
|
|
// >= - greater than or equal to
|
|
|
|
|
|
|
|
-let temp = 31
|
|
|
|
|
-let isFreezing = temp < 32
|
|
|
|
|
|
|
+let temp = 180
|
|
|
|
|
+
|
|
|
|
|
+if (temp <= 32) {
|
|
|
|
|
+ console.log('It is freezing outside!')
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+if (temp >= 110) {
|
|
|
|
|
+ console.log('It is way too hot outside!')
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
-console.log(isFreezing)
|
|
|
|
|
|
|
|
|
|
//Challenge area
|
|
//Challenge area
|
|
|
|
|
|
|
@@ -18,9 +24,12 @@ console.log(isFreezing)
|
|
|
// Print is child value
|
|
// Print is child value
|
|
|
// Print is senior value
|
|
// Print is senior value
|
|
|
|
|
|
|
|
-let age = 7
|
|
|
|
|
-let isChild = age <= 65
|
|
|
|
|
-let isSenior = age >= 65
|
|
|
|
|
|
|
+let age = 6
|
|
|
|
|
+
|
|
|
|
|
+if (age <= 7){
|
|
|
|
|
+ console.log('You are eligible for child discount')
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
-console.log('isChild: ' + isChild )
|
|
|
|
|
-console.log('isSenior: ' + isSenior)
|
|
|
|
|
|
|
+if (age >=65) {
|
|
|
|
|
+ console.log('Lucky you, you get the senior discount')
|
|
|
|
|
+}
|