fix(curriculum): remove setup code not needed anymore from Testing Objects for Properties challenge (#38454)
* fix: remove setup code * fix: remove call to function
This commit is contained in:
@ -52,38 +52,22 @@ tests:
|
|||||||
<div id='js-seed'>
|
<div id='js-seed'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// Setup
|
|
||||||
var myObj = {
|
|
||||||
gift: "pony",
|
|
||||||
pet: "kitten",
|
|
||||||
bed: "sleigh"
|
|
||||||
};
|
|
||||||
|
|
||||||
function checkObj(obj, checkProp) {
|
function checkObj(obj, checkProp) {
|
||||||
// Only change code below this line
|
// Only change code below this line
|
||||||
return "Change Me!";
|
return "Change Me!";
|
||||||
// Only change code above this line
|
// Only change code above this line
|
||||||
}
|
}
|
||||||
|
|
||||||
checkObj(myObj, "gift");
|
|
||||||
```
|
```
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
## Solution
|
## Solution
|
||||||
<section id='solution'>
|
<section id='solution'>
|
||||||
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
var myObj = {
|
|
||||||
gift: "pony",
|
|
||||||
pet: "kitten",
|
|
||||||
bed: "sleigh"
|
|
||||||
};
|
|
||||||
function checkObj(obj, checkProp) {
|
function checkObj(obj, checkProp) {
|
||||||
if(obj.hasOwnProperty(checkProp)) {
|
if(obj.hasOwnProperty(checkProp)) {
|
||||||
return obj[checkProp];
|
return obj[checkProp];
|
||||||
|
Reference in New Issue
Block a user