This process can be slow and inefficient, and is rarely necessary. The reason the first one outputs "MyObj" is because it's called as an object property, so that object becomes the "this" keyword. If you provide a name, use it, otherwise set the name to ‘default’; e.g.: var firstObj = new BaseObject(); var secondObj = new BaseObject('unique'); console.log(firstObj.name); // -> Results in 'default' console.log(secondObj.name); More about the author Makes eval() safer.
Can you give us something to work with please? When i try to use IE, everything works, so I have NO idea what to do...
© Copyright 2017 agileweb.org. All rights reserved.