← Back to challenges

Buggy Code

JavaScriptMediumbugslanguage_fundamentals

Instructions

The challenge is to try and fix this buggy code, given the inputs true and false. See the examples below for the expected output.

Examples

has_bugs(true) ➞ "sad days"

has_bugs(false) ➞ "it's a good day"

Notes

Don't overthink this challenge (look at the syntax and correct it).

javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Evaluate an Equation