JavaScript DOM Scripting By Example Improving the Application Code Refactor 2: Readable Branching Logic

Zachary Danz
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Zachary Danz
Front End Web Development Techdegree Graduate 15,023 Points

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
207,606 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
207,606 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.

Zachary Danz
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Zachary Danz
Front End Web Development Techdegree Graduate 15,023 Points

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
207,606 Points

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

Zachary Danz
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Zachary Danz
Front End Web Development Techdegree Graduate 15,023 Points

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
207,606 Points

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

Henry Blandon
seal-mask
.a{fill-rule:evenodd;}techdegree
Henry Blandon
Full Stack JavaScript Techdegree Student 14,460 Points

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.