Wednesday, 18 September 2013

Coffescript: Reserved Word error

Coffescript: Reserved Word error

I have the following piece of code in Coffee-script
class @Badge
setIssues: (count)->
@count = count
@render()
When i run my script, i get the following error ,
Uncaught Syntax-Error: Unexpected reserved word
I am complete newbie in Coffee-script , so totally off-guard as of how to
fix this error
I tried removing the word 'class' , hence removing the first
line(including @Badge), as it is mentioned here , that 'class' is a
reserved word . On doing so , it resulted in the error ,
Uncaught SyntaxError: Unexpected token >
How can i fix this error ?

No comments:

Post a Comment