Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript Object-Oriented JavaScript Working with Classes in JavaScript Writing Your First Class

I don't have the code for the other pets!

Ashley says that the code for the other pets will be in the pets.js file, but mine only has Ernie. Does everyone else have this problem, or is it just me.

4 Answers

Steven Parker
Steven Parker
210,425 Points

The "pets.js" file in the workspace contains "ernie", "vera", "scofield", and "edel". You may need to close and re-launch the workspace.

If that doesn't help, you may need to completely restart the workspace. Go to the Workspaces page and locate the one you are using. Click on the trashcan icon on the right side to delete the workspace, and confirm when you get the pop-up.

With the workspace deleted, you can go back to the course and "Launch Workspace" again. When it comes up, it should have all the files you started with in their initial states.

Thanks for that

Kevin Gates
Kevin Gates
14,826 Points

Here's the values if you need them:

const ernie = {
    animal: 'dog',
    age: '1',
    breed: 'pug',
    bark: function(){
        console.log('Woof!');
    }
}

const vera = {
    animal: 'dog',
    age: 8,
    breed: 'Border Collie',
    bark: function(){
        console.log('Woof!');
    }
}

const scofield = {
    animal: 'dog',
    age: 6,
    breed: 'Doberman',
    bark: function(){
        console.log('Woof!');
    }

  }

const edel = {
    animal: 'dog',
    age: 7,
    breed: 'German Shorthairder Pointer',
    bark: function(){
        console.log('Woof!');
    }
}
Jojo Menzies
Jojo Menzies
14,085 Points

Great! Had the same problem. It's fixed now. Thanks!

John Norris
John Norris
21,141 Points

Same problem here. As Steven said, just had to delete the Workspace https://teamtreehouse.com/workspaces