mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(learn): fix editable region workshop-logic-checker-app (#65274)
This commit is contained in:
+1
-2
@@ -44,9 +44,8 @@ assert.match(__helpers.removeJSComments(code), /\bif\s*\(\s*hasDeveloperJob\s*\)
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
--fcc-editable-region--
|
||||
const hasDeveloperJob = true;
|
||||
|
||||
--fcc-editable-region--
|
||||
|
||||
--fcc-editable-region--
|
||||
```
|
||||
|
||||
+2
-1
@@ -41,9 +41,10 @@ const hasDeveloperJob = true;
|
||||
if (hasDeveloperJob) {
|
||||
console.log("Timmy is employed as a developer.");
|
||||
}
|
||||
--fcc-editable-region--
|
||||
|
||||
const isTimmyAGamer = false;
|
||||
|
||||
--fcc-editable-region--
|
||||
|
||||
--fcc-editable-region--
|
||||
```
|
||||
|
||||
+1
@@ -39,6 +39,7 @@ const isTimmyAGamer = false;
|
||||
if (isTimmyAGamer) {
|
||||
console.log("Timmy loves to play World of Warcraft.");
|
||||
}
|
||||
|
||||
--fcc-editable-region--
|
||||
|
||||
--fcc-editable-region--
|
||||
|
||||
+2
-1
@@ -57,9 +57,10 @@ const isTimmyAGamer = false;
|
||||
if (isTimmyAGamer) {
|
||||
console.log("Timmy loves to play World of Warcraft.");
|
||||
}
|
||||
--fcc-editable-region--
|
||||
|
||||
const timmyAge = 18;
|
||||
|
||||
--fcc-editable-region--
|
||||
|
||||
--fcc-editable-region--
|
||||
```
|
||||
|
||||
+2
-1
@@ -49,11 +49,12 @@ const isTimmyAGamer = false;
|
||||
if (isTimmyAGamer) {
|
||||
console.log("Timmy loves to play World of Warcraft.");
|
||||
}
|
||||
--fcc-editable-region--
|
||||
|
||||
const timmyAge = 18;
|
||||
|
||||
if (timmyAge >= 16) {
|
||||
console.log("Timmy is old enough to drive.");
|
||||
--fcc-editable-region--
|
||||
}
|
||||
--fcc-editable-region--
|
||||
```
|
||||
|
||||
+2
@@ -33,9 +33,11 @@ const isTimmyAGamer = false;
|
||||
if (isTimmyAGamer) {
|
||||
console.log("Timmy loves to play World of Warcraft.");
|
||||
}
|
||||
|
||||
--fcc-editable-region--
|
||||
const timmyAge = 18;
|
||||
--fcc-editable-region--
|
||||
|
||||
if (timmyAge >= 16) {
|
||||
console.log("Timmy is old enough to drive.");
|
||||
} else {
|
||||
|
||||
+1
-2
@@ -34,9 +34,8 @@ assert.match(__helpers.removeJSComments(code), /console\s*\.\s*log\s*\(\s*Boolea
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
--fcc-editable-region--
|
||||
const truthyOrFalsy = true;
|
||||
|
||||
--fcc-editable-region--
|
||||
|
||||
--fcc-editable-region--
|
||||
```
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ assert.strictEqual(truthyOrFalsy, "freeCodeCamp");
|
||||
```js
|
||||
--fcc-editable-region--
|
||||
const truthyOrFalsy = true;
|
||||
--fcc-editable-region--
|
||||
|
||||
console.log(Boolean(truthyOrFalsy));
|
||||
--fcc-editable-region--
|
||||
```
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ assert.strictEqual(truthyOrFalsy, "");
|
||||
```js
|
||||
--fcc-editable-region--
|
||||
const truthyOrFalsy = "freeCodeCamp";
|
||||
--fcc-editable-region--
|
||||
|
||||
console.log(Boolean(truthyOrFalsy));
|
||||
--fcc-editable-region--
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user