How to make contructors for a javascript plugin?

I'm having problems testing constructors for plugins made in javascript.

`var a = new TestObj();` works fine, but how do I assign arguments, and make alternative constructors? `function TestObj(myString : String)` inside TestObj.js in the pluginsfolder doesn't seem to do the job. That's trying : `var a = new TestObj("Hello World");`

class TestObj {
    var string : String;

    function TestObj (myString : String) {
        string = myString;

By the way, Javascript doesn't have plugins and you aren't gaining anything special by putting the script in a plugins folder. (Other than making it compile earlier, which can be done just as well by using the Standard Assets folder.)