In the Using typeof challenge, if one were to submit:
console.log(typeof "")
console.log(typeof 0)
console.log(typeof [])
console.log(typeof {})
However, if semicolons were added:
console.log(typeof "");
console.log(typeof 0);
console.log(typeof []);
console.log(typeof {});
Then all the tests are passed. Javascript does not require semicolons therefore this is simply complicating the challenge for users who do not use semicolons.
Thanks for reporting this bug @ChrisBrownie55!
The challenge has been removed in the beta, but there is still a challenge about typeof. It also requires a semicolon. We don't need to enforce that here.
You can find the code here:
https://github.com/freeCodeCamp/freeCodeCamp/blob/5214371ef124f24f242cd8a619ba8a8f1992cbe6/seed/challenges/02-javascript-algorithms-and-data-structures/debugging.json#L129
Removing the semicolon from the regular expression there should do the trick.
Check out CONTRIBUTING.md to get your local development environment set up.
If you need help, please go to our contributors chatroom. We're always happy to answer any questions!
I submitted a PR for this. It should now work as intended.
Thanks @ncaron!
Most helpful comment
I submitted a PR for this. It should now work as intended.