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 trialKim Dallas
11,461 Pointssomething weird is happening
this is not my code. everytime I restart this, I get different screens. it was originally blank. It keeps changing
function getYear
var year = new Date()
.getFullYear(){
}
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JavaScript Basics</title>
</head>
<body>
<script src="script.js"></script>
</body>
</html>
3 Answers
Jason Anders
Treehouse Moderator 145,860 PointsHi Kim,
It sounds like some sort of caching issue. When I launch the challenge, I do just get the blank code box to start the challenge.
I suggest you clear you cache and then re-launch the challenge. If that fails, try logging out of Treehouse, clearing your cache, quitting your browser and then relaunching everything fresh.
If all else fails, you'll need to contact the Treehouse Support Team for this. Just remember that today is a Holiday in the US, so the Support Staff may not get back to you until tomorrow.
Hope you get it sorted out. :)
Brendan Whiting
Front End Web Development Techdegree Graduate 84,738 PointsChallenge Task 1 of 3 we just want to define the function:
function getYear() {
}
Then Challenge Task 2 or 3 they want us to add that line code inside the function, and return the year
variable:
function getYear() {
var year = new Date().getFullYear();
return year;
}
Something went wrong where you're missing some parts of it.
Kim Dallas
11,461 PointsI know that it's wrong Brendan. I didn't write it. it's coming up by itself in random ways.
Brendan Whiting
Front End Web Development Techdegree Graduate 84,738 PointsOh, that's strange. Must be a bug.
Kim Dallas
11,461 PointsKim Dallas
11,461 Pointsthank you. i'm trying to get the last two questions done so i'll be finished. i've tried clearing my cookies and history. it seems to be happening with my laptop more than my new computer. the last two are sticking too .