freeCodeCamp / freeCodeCamp/freeCodeCamp
Lack of white space causing tests to fail for `else` statement
- Dominant language
- TypeScript
- Stars
- 455k
- Forks
- 46.2k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 215
Description
### Describe the Issue
The `else` statement fails when white space is not present before and/or after the opening and closing curly brace.
### Affected Page
https://www.freecodecamp.org/learn/javascript-v9/workshop-logic-checker-app/step-12
### Your code
```
}else{
console.log("Timmy is not old enough to drive.")
}
```
```
} else{
console.log("Timmy is not old enough to drive.")
}
```
```
}else {
console.log("Timmy is not old enough to drive.")
}
```
### Expected behavior
Test should pass when the code is correct.
### Screenshots
### System
- Device: [e.g. iPhone 6, Laptop]
- OS: [e.g. iOS 14, Windows 10, Ubuntu 20.04]
- Browser: [e.g. Chrome, Safari]
- Version: [e.g. 22]
### Additional context
_No response_
Contributor guide
Research direction
Open the affected Step 12 workshop page and reproduce the three examples with missing whitespace around the braces. Trace the lesson's validation behavior for the else statement; done means each syntactically valid example passes its test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 57/100