Kristofer Koishigawa b3213fc892 fix(i18n): chinese test suite (#38220)
* 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
2020-03-03 18:49:47 +05:30

1.5 KiB
Raw Blame History

id, title, challengeType, videoUrl, localeTitle
id title challengeType videoUrl localeTitle
bd7123c9c441eddfaeb4bdef Comment Your JavaScript Code 1 评论您的JavaScript代码

Description

注释是JavaScript有意忽略的代码行。注释是一种很好的方式可以将注释留给自己和其他人这些人稍后需要弄清楚代码的作用。在JavaScript中编写注释有两种方法使用//将告诉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