Help get this topic noticed by sharing it on Twitter, Facebook, or email.
I’m frustrated

Legal Names in JavaScript, Head First JavaScript, 2008 Edition

On page 54, some of the answers to the JavaScript Magnets that didn't make it as correct answers seem like they should have.

The reason I think they are correct is because it is asking which ones are no legal. Now some of these aren't preferred, but technically they aren't illegal.

First one: "alarm_status" should be okay; it doesn't have camelCase and it uses an underscore in the middle, but it should be okay. On page 50, it says, and I quote, "Each character after the first character can be a letter, and underscore (_), a dollar sign ($), or a number."

Second one: "eclairRECORDHOLDER" has all caps, but there's nothing that says you can't do that.

Did I miss something here? Can anybody clarify this?
1 person has
this problem
+1
Reply