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 DOM Scripting By Example Improving the Application Code Refactor 2: Readable Branching Logic

Uncaught TypeError: nameActions[action] is not a function

https://w.trhou.se/9ds32avluo

Hello all, I'm getting this error from line 107. I see someone else posted a similar problem but theirs was a typo. Not able to figure out what's wrong with my own code here... Thanks for taking a look!

Steven Parker
Steven Parker
240,995 Points

The workspace snapshot seems to be empty (it exists, but has no files in it)! There was scheduled maintenance on workshops today, but the Status page says it has been completed.

In case the maintenance did something to the snapshot, try making a fresh one and posting the new link here.

2 Answers

Steven Parker
Steven Parker
240,995 Points

Looks like your snapshot got fixed!

So the issue is that the button legends are being used as keys to access class methods, but the names don't match. The button legends have capital first letters (like "Edit"), but the method names are all lower case ("edit").

You can use either spelling as long as it's done consistently.

It's amazing how little mistakes like this can get you so caught up - I was so careful earlier in the process to make sure I was paying attention to my own case sensitivity. Thank you so much! I really appreciate it

Steven Parker
Steven Parker
240,995 Points

Zachary Danz — Glad to help. You can mark the question solved by choosing a "best answer".
And happy coding!

Somehow all of my work has disappeared on this... I have no idea why. Maybe something to do with the maintenance? The Workspace has been reset to the original state from when you start the course. Ah well, thanks for looking Steven Parker

Steven Parker
Steven Parker
240,995 Points

The status page now says they're working on it, maybe it will be restored shortly. Keep an eye on it.

Hello, two things I recommend.

  1. download the files, they have a start file and final products, that way you can start from where you left.
  2. download the file and use your own editor, the one are planning to use for work, that way you will get familiarized with the shortcut keys, extensions etc. and also use git and branching just for practice that way you can refer to your previous version if something when wrong.