- script.js
JavaScript
var enoughDevelopers = false;
var techAvailable = false;
var onVacation = false;
var onSickLeave = false;
if (enoughDevelopers && techAvailable) {
console.log('You can start the project');
}
if (onVacation) {
console.log('No one is on vacation');
} else {
console.log('Someone is on vacation');
}
if (onSickLeave) {
console.log('No one is on sick leave');
} else {
console.log('Someone is on sick leave');
}
Result
Goalscompleted
Let’s experiment with negations.
- Change the vacation check to the check with negation.
- Do the same with the check about sick leave.
- Indicate that one of the developers is on vacation.
- Indicate that one of the developers is out sick.
Comments