"bark"
property to ourDog
:
ourDog.bark = "bow-wow";
or
ourDog["bark"] = "bow-wow";
Now when we evaluate ourDog.bark
, we'll get his bark, "bow-wow".
"bark"
property to myDog
and set it to a dog sound, such as "woof". You may use either dot or bracket notation.
"bark"
to myDog
.
testString: assert(myDog.bark !== undefined, 'Add the property "bark"
to myDog
.');
- text: Do not add "bark"
to the setup section
testString: assert(!/bark[^\n]:/.test(code), 'Do not add "bark"
to the setup section');
```