Oliver Eyton-Williams bd68b70f3d
Feat: hide blocks not challenges (#39504)
* fix: remove isHidden flag from frontmatter

* fix: add isUpcomingChange

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>

* feat: hide blocks not challenges

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>
2020-09-03 15:07:40 -07:00

1.6 KiB

id, title, challengeType, videoUrl, forumTopicId
id title challengeType videoUrl forumTopicId
bd7123c9c441eddfaeb4bdef Comment Your JavaScript Code 1 https://scrimba.com/c/c7ynnTp 16783

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.

Tests

tests:
  - text: You should create a <code>//</code> style comment that contains at least five letters.
    testString: assert(code.match(/(\/\/)...../g));
  - text: You should create a <code>/* */</code> style comment that contains at least five letters.
    testString: assert(code.match(/(\/\*)([^\/]{5,})(?=\*\/)/gm));

Challenge Seed


Solution

// Fake Comment
/* Another Comment */