Do you know how to create a name for a constructor object in javascript? I have a fiddle please look at this. http://jsfiddle.net/m8jLoon9/2/
ex.
// you can name the object by using this
function MyConstructorName() {}
// with this one, the name of the objct is the variable
var varConstructorName = function() {};
// MyConstructorName{}
console.log( new MyConstructorName() );
// varConstructorName{}
console.log( new varConstructorName() );
// I have a function that creates an object
// with the name arguments provided
function createANameSpace(nameProvided) {
// how to create a constructor with the specified name?
// I want to return an object
// EDITED, this is wrong, I just want to show what I want on this function
var TheName = function nameProvided() {};
// returns an new object, consoling this new object should print out in the console
// the argument provided
return new TheName();
}
// create an aobject with the name provided
var ActorObject = createANameSpace('Actor');
// I want the console to print out
// Actor{}
console.log( ActorObject );