- script.js
JavaScript
var enoughDevelopers = true;
var techAvailable = false;
var message = 'You cannot start the project';
console.log(message);
Result
Goalscompleted
Let’s describe a compound condition using nested if.
- Between declaring the
messagevariable and logging in the console, addifwith theenoughDeveloperscondition. - Inside the
ifblock, add one moreifwith thetechAvailablecondition. - Inside the block of the second
if, add assignmentmessage = 'You can start the project';. - Change the value of the
techAvailablevariable totrue. The value ofmessageshould change.
Comments