JavaScript : Boolean Expressions V


  1. Correctly apply DeMorgan's theorem to the case of OR.

 Your Task, Your Challenge 

Le robot loueur de voiture

Write your code so that the robot lets the cyber dog out at the right time.

Use DeMorgan’s theorem so that the robot only lets the cyber dog out if no raindrops are falling. If it begins to sprinkle, the dog will rust and will no longer even be able to go out.

There are 2 tests you can use to do this:

  1. rain() checks whether it's raining or not;
  2. watering() checks whether the watering system works or not.

 It's your turn :O) 

You must ensure that for every possible case the robot decides correctly whether or not to let the dog out.

Good luck!