boolean.js 667 B

1234567891011121314151617181920212223242526272829303132333435
  1. // === - equiality operator
  2. // !== - not equal operator
  3. // < - less than
  4. // > - greater than
  5. // <= - less than or equl to
  6. // >= - greater than or equal to
  7. let temp = 180
  8. if (temp <= 32) {
  9. console.log('It is freezing outside!')
  10. }
  11. if (temp >= 110) {
  12. console.log('It is way too hot outside!')
  13. }
  14. //Challenge area
  15. // Create age set to your age
  16. // Calculate is child - if they are 7 or under
  17. // Calculate is senore - if they are 65 or older
  18. // Print is child value
  19. // Print is senior value
  20. let age = 6
  21. if (age <= 7){
  22. console.log('You are eligible for child discount')
  23. }
  24. if (age >=65) {
  25. console.log('Lucky you, you get the senior discount')
  26. }