It seems to me that you are mixing Foo and f. If that's not intended then
what you want can be obtained with:

```
var x = 0;

function Foo() {
if (new.target) {
this.i = 0;
} else {
// I don't know what class.instance is supposed to mean.
return x++;
}
}

Object.setPrototypeOf(Foo, null);
```

All the functions that we create are user defined callable objects.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to