* feat(tools): add seed/solution restore script * chore(curriculum): remove empty sections' markers * chore(curriculum): add seed + solution to Chinese * chore: remove old formatter * fix: update getChallenges parse translated challenges separately, without reference to the source * chore(curriculum): add dashedName to English * chore(curriculum): add dashedName to Chinese * refactor: remove unused challenge property 'name' * fix: relax dashedName requirement * fix: stray tag Remove stray `pre` tag from challenge file. Signed-off-by: nhcarrigan <nhcarrigan@gmail.com> Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
1.4 KiB
id, title, challengeType, videoUrl, forumTopicId, dashedName
id | title | challengeType | videoUrl | forumTopicId | dashedName |
---|---|---|---|---|---|
bd7123c9c441eddfaeb4bdef | Comment Your JavaScript Code | 1 | https://scrimba.com/c/c7ynnTp | 16783 | comment-your-javascript-code |
--description--
Comments are lines of code that JavaScript will intentionally ignore. Comments are a great way to leave notes to yourself and to other people who will later need to figure out what that code does.
There are two ways to write comments in JavaScript:
Using //
will tell JavaScript to ignore the remainder of the text on the current line:
// This is an in-line comment.
You can make a multi-line comment beginning with /*
and ending with */
:
/* This is a
multi-line comment */
Best Practice
As you write code, you should regularly add comments to clarify the function of parts of your code. Good commenting can help communicate the intent of your code—both for others and for your future self.
--instructions--
Try creating one of each type of comment.
--hints--
You should create a //
style comment that contains at least five letters.
assert(code.match(/(\/\/)...../g));
You should create a /* */
style comment that contains at least five letters.
assert(code.match(/(\/\*)([^\/]{5,})(?=\*\/)/gm));
--seed--
--seed-contents--
--solutions--
// Fake Comment
/* Another Comment */