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.

Erik Sayce
4,704 PointsMissing a variable declaration in my try block?
I'm struggling with this one, when I run the code I'm getting an error that I'm missing my variable declaration in my try block. I'm new to this so I'm sure it's a simple oversight but I've put a half and hour in trying to figure it out to no avail. Help!!
var jsonString = 'This is not a JSON String';
try {
var jasonObject = JSON.parse(jsonString);
} catch (error){
console.log(error.message);
};
1 Answer

Robert Richey
Courses Plus Student 16,352 PointsHi Erik,
This was tricky. Your variable inside the try block is spelled jasonObject
and needs to be jsonObject
Erik Sayce
4,704 PointsErik Sayce
4,704 Pointsugh I've done this like 12 times but didn't catch it this time around.
thanks!
Andrew Chalkley
Treehouse Guest TeacherAndrew Chalkley
Treehouse Guest TeacherErik Sayce - A second pair of eyes always help.
Jason Seifer and I have a long running joke of saying "JSON not Jason" or was it "Jason not JSON" :)