Enum in JavaScript

Hi guys,i am learning actually unity…
my question is:
in JS how can i declare enum?

i used this structure:

private enum ERot{Left=-1,none=0,Right=1
}
(after i want to assign a variable to ERot like var state:ERot;)
i declared this before update function in the upper part of the code…

what i am doing wrong?

i need a class to do this?

Negative values aren’t allowed.

–Eric

so what kind of operation i can do with enum in JS?

(i must consider to convert some script in c# instead)

Anything, as long as it involves positive integers.

–Eric