Trailing Commas in JavaScript

Mark Adelsberger HTML5, JavaScript, Problem Solving, Tutorial Leave a Comment

The Scenario You’re working on a JavaScript project, and your project includes the following object definition: You go to add another method to your object. You return to your test page and get mysteriously unexpected behavior. What happened? You’ve probably recognized the mistake in the above code, but then if you write much JavaScript, there’s a good chance you’ve made …