Fixing syntax error. Js isn't Ruby