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

2.1 KiB
Raw Blame History

id, title, challengeType, videoUrl, localeTitle
id title challengeType videoUrl localeTitle
587d7dac367417b2b2512b73 Create a Basic JavaScript Object 1 创建一个基本的JavaScript对象

Description

想想人们每天看到的东西,比如汽车,商店和鸟类。这些都是objects :人们可以观察和互动的有形事物。这些objects一些特质是什么?一辆车有轮子。商店出售物品。鸟有翅膀。这些品质或properties定义了构成object 。请注意,类似objects共享相同的properties ,但这些properties可能具有不同的值。例如,所有汽车都有轮子,但并非所有汽车都有相同数量的轮子。 JavaScript中的Objects用于模拟现实世界的对象,为它们提供properties和行为,就像它们的真实对象一样。这是使用这些概念创建duck object的示例:
让duck = {
名称“Aflac”
numLegs2
};
这个duck object有两个属性/值对: name “Aflac”和numLegs为2。

Instructions

使用namenumLegs属性创建一个dog object ,并将它们分别设置为字符串和数字。

Tests

tests:
  - text: <code>dog</code>应该是一个<code>object</code> 。
    testString: assert(typeof(dog) === 'object');
  - text: <code>dog</code>应该将<code>name</code>属性设置为<code>string</code> 。
    testString: assert(typeof(dog.name) === 'string');
  - text: <code>dog</code>应该将<code>numLegs</code>属性设置为<code>number</code> 。
    testString: assert(typeof(dog.numLegs) === 'number');

Challenge Seed

let dog = {

};

Solution

// solution required