accessing siblings in javascript

Problem

I'm writing a node application and I would like to get the name of the variable that invokes a constructor.

a=new constructorFunction();
b=new constructorFunction();

function constructorFunction(){
    this.test="it works!";
    this.doSomething=function(){
       //this should return the contents of this.test
    }
}

console.log(a.doSomething());
console.log(b.doSomething());

As the comment says, I'd like to return the values of a.test and b.test. How can I accomplish this?

Problem courtesy of: devnill

Solution

It doesn't need to be any more complicated than this (fiddle):

function constructorFunction() {
  this.test="it works!";
  this.doSomething = function() {
    return this.test;
  }
}
Solution courtesy of: rjz

Discussion

a=new constructorFunction();
b=new constructorFunction();

function constructorFunction(){
    var self = this;
    this.test="it works!";
    this.doSomething=function(){
       return self.test;
    }
}
Discussion courtesy of: Delapouite

In chrome this works... (V8 so I assume node.js will behave the same)

http://jsfiddle.net/zTTZR/1/

a=new constructorFunction();
b=new constructorFunction();

function constructorFunction(){
    this.test="it works!";
    this.doSomething=function(){
       return this.test;
    }
}

console.log(a.doSomething());
Discussion courtesy of: Eran Medan

This recipe can be found in it's original form on Stack Over Flow.