The Brackets dev team uses JSLint to catch known issues with JS. It's built in to Brackets. Use `View > Lint Files on Save` to make sure it's turned on. Then you'll see an icon in the statusbar that's either a green circle with a checkmark (no errors) or a yellow triangle with an exclamation mark (1 or more errors). If there are errors and you don't see a bottom panel with a list of errors, then click on the icon to toggle panel open.

The first error I see is that the comma at end of this line should be removed.