* fix: Chinese test suite Add localeTiltes, descriptions, and adjust test text and testStrings to get the automated test suite working. * fix: ran script, updated testStrings and solutions
1.5 KiB
1.5 KiB
id, title, challengeType, videoUrl, localeTitle
id | title | challengeType | videoUrl | localeTitle |
---|---|---|---|---|
bd7123c9c441eddfaeb4bdef | Comment Your JavaScript Code | 1 | 评论您的JavaScript代码 |
Description
//
将告诉JavaScript忽略当前行上的其余文本: //这是一个内嵌评论。您可以使用
/*
开头并以*/
结尾的多行注释: /* 这是一个最佳实践
多行评论* /
在编写代码时,应定期添加注释以阐明代码部分的功能。良好的评论可以帮助传达您的代码的意图 - 包括他人和未来的自我。
Instructions
Tests
tests:
- text: 创建一个包含至少五个字母的<code>//</code>样式注释。
testString: assert(code.match(/(\/\/)...../g));
- text: 创建包含至少五个字母的<code>/* */</code>样式注释。
testString: assert(code.match(/(\/\*)([^\/]{5,})(?=\*\/)/gm));
Challenge Seed
Solution
// solution required