Code of horror:
var namespace = new function ()
{
this.saySomething = new function( something )
{
console.log( something );
};
}
namespace.saySomething( "whatever" );
This outputs "undefined" when I expected it to output "whatever". How come? And what would the fix be? My goal is nothing more than to have a namespace where I put some helper functions.