Syntax errors in javascript.snippets