If you want B to have access to that function you need to define it in the prototype of A.
A.protototype.hehe = function(){
//do something
};
Your call to the parents constructor is also missing in b.
With this.hehe every instance of A is getting it's own hehe function, thus not being in the prototype.
Also a nicer implentation of prototypal inhertiance is as follows - Well that is a matter of opinion I know.
function __extends(child,parent){ //Global function for inheriting from objects
function Temp(){this.constructor = child;} //Create a temporary ctor
Temp.prototype = parent.prototype;
child.prototype = new Temp(); //Set the child to an object with the child's ctor with the parents prototype
}
var B = (function(_parent){
__extends(B,A);
function B(){
_parent.call(this);
}
})(A);