Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
This Boolean Logic worksheet is part of the JavaScript Coding without HTML and CSS journey. Print it as a booklet?
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1isSunny && isWarm | AWrong - use || instead of the word 'or' | |
| 2isSunny || isWarm | BWrong - use && instead of the word 'and' | |
| 3Reverses a boolean's value | ChasTicket && hasID | |
| 4Combines two conditions, requiring both to be true | D!isOpen | |
| 5console.log(a and b); | ETrue only if both isSunny and isWarm are true | |
| 6console.log(x or y); | FTrue if at least one of isSunny or isWarm is true |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
&& — A logical operator that returns true only if both conditions on either side are true.console.log(isSunny && isWarm);console.log(isSunny || isWarm);console.log(!isSunny);let ready = hasTicket && hasID;let closed = !isOpen;