Defining a Javascript Class

How does one set up a javascript class?

csdg

class MyAwesomeClass {
    var foo : int;
    function MyAwesomeClass (f : int) {
        foo = f;
    }
}

function Start () {
    var blah = new MyAwesomeClass(99);
    print (blah.foo);
}