Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript JavaScript Basics (Retired) Creating Reusable Code with Functions Returning a Value from a Function

Workspace timing out

I'm on JavaScript Basics, Challenge Task 2 of 3 ( Challenge Task 1 of 3 Create a function named getYear -- don't add any code inside the function yet. )

it keeps timing out :/

Hello Robert,

When I am having timeout issues sometimes it helps to refresh the page. Since the tasks continue from each other just copy the code you already have in the screen before you refresh the page. Also, I find it works better on the app on my phone if that does not work. Lastly, sometimes if I just let the screen sit there for a while, it randomly succeeds.

3 Answers

It might be worth contacting Treehouse Support directly so they can look into it for you.

Try to give them as much detail as possible, including URLs of pages you're on, and the steps taken for the error to occur.

Hope it gets sorted out! It can be frustrating, especially when you know the answers! :)

It might be worth contacting Treehouse Support directly so they can look into it for you.

Try to give them as much detail as possible, including URLs of pages you're on, and the steps taken for the error to occur.

Hope it gets sorted out! It can be frustrating, especially when you know the answers! :)

TaJuanna Williams
TaJuanna Williams
26,697 Points

All, I encounter the same issue. **Were you returning getYear or year? I refreshed the screen and the following code worked.

function getYear() { var year = new Date().getFullYear(); return year; }