* feat(curriculum): Add Basic JS Scrimba links * Fix: Add missing video url. * fix: update videoUrl
1.8 KiB
1.8 KiB
id, title, challengeType, videoUrl
id | title | challengeType | videoUrl |
---|---|---|---|
bd7123c9c441eddfaeb4bdef | Comment Your JavaScript Code | 1 | https://scrimba.com/c/c7ynnTp |
Description
//
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 aBest Practice
multi-line comment */
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
Tests
tests:
- text: Create a <code>//</code> style comment that contains at least five letters.
testString: assert(code.match(/(\/\/)...../g), 'Create a <code>//</code> style comment that contains at least five letters.');
- text: Create a <code>/* */</code> style comment that contains at least five letters.
testString: assert(code.match(/(\/\*)([^\/]{5,})(?=\*\/)/gm), 'Create a <code>/* */</code> style comment that contains at least five letters.');
Challenge Seed
Solution
// Fake Comment
/* Another Comment */