curriculum/challenges/english/blocks/workshop-logic-checker-app/690a06833d3e83b5226ade78.md
A conditional statement is used to run code depending on a condition. It is composed of the if keyword, followed by a condition enclosed by parentheses, and a body enclosed by curly braces. Here's an example of an if statement:
if (condition) {
console.log("condition is truthy");
}
When condition is a truthy value (non-empty string, non-zero number, true, etc.) the code within the if statement's body is executed.
Below your variable, create an if statement that uses hasDeveloperJob as its condition. Within the body of your if statement, log "Timmy is employed as a developer." to the console.
You should have an if statement.
assert.match(__helpers.removeJSComments(code), /\bif\s*\(.+\)\s*\{?/);
Your if statement should use hasDeveloperJob as its condition.
assert.match(__helpers.removeJSComments(code), /\bif\s*\(\s*hasDeveloperJob\s*\)\s*\{?/);
You should log "Timmy is employed as a developer." to the console within your if statement.
assert.match(__helpers.removeJSComments(code), /\bif\s*\(\s*hasDeveloperJob\s*\)\s*\{\s*console\s*\.\s*log\s*\(\s*('|"|`)Timmy is employed as a developer.\1\s*\)\s*;?\s*\}/);
const hasDeveloperJob = true;
--fcc-editable-region--
--fcc-editable-region--