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:
Randell Dawson
2020-03-27 07:25:04 -07:00
committed by GitHub
parent 740d57d962
commit a5818506f0

View File

@ -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];