"bark"
a ourDog
: ourDog.bark = "bow-wow";
o ourDog["bark"] = "bow-wow";
Ahora, cuando evaluamos ourDog.bark
, obtendremos su ladrido, "bow-wow". "bark"
a myDog
y myDog
con un sonido de perro, como "woof". Puede usar la notación de punto o corchete. "bark"
a myDog
.
testString: 'assert(myDog.bark !== undefined, "Add the property "bark"
to myDog
.");'
- text: No agregue "bark"
a la sección de configuración
testString: 'assert(!/bark[^\n]:/.test(code), "Do not add "bark"
to the setup section");'
```