create instance from object

May 3, 2014 at 8:51 AM
hi, how can i add a object to script to use as instance like:
var hello = new world();
May 4, 2014 at 12:28 AM
May 4, 2014 at 1:35 PM
why is it not so easy to add a instancable class?
May 5, 2014 at 1:05 AM
I wouldn't say it's terribly complicated, but it would be true to say that the JavaScript new operator doesn't map very well to traditional OO classes. No doubt it would be possible to simplify things, but it works well enough IMO.