| 1234567891011121314151617181920212223242526272829303132333435 |
- // === - equiality operator
- // !== - not equal operator
- // < - less than
- // > - greater than
- // <= - less than or equl to
- // >= - greater than or equal to
- let temp = 180
- if (temp <= 32) {
- console.log('It is freezing outside!')
- }
- if (temp >= 110) {
- console.log('It is way too hot outside!')
- }
- //Challenge area
- // Create age set to your age
- // Calculate is child - if they are 7 or under
- // Calculate is senore - if they are 65 or older
- // Print is child value
- // Print is senior value
- let age = 6
- if (age <= 7){
- console.log('You are eligible for child discount')
- }
- if (age >=65) {
- console.log('Lucky you, you get the senior discount')
- }
|