Problems with basic prototyping in Javascript


i am kinda new to javascript and i started off on something where i am stuck with some basics, the thing is i am trying to create an prototype for an object and then the references of created objects in an array and then accesing their methods but i am wrong somewhere can anyone help me with this, what i am doing is shown here :-

function Obj(n){
    var name=n;
Obj.prototype.disp = function(){
var l1=new Obj("one");
var l2=new Obj("two");
var lessons=[l1,l2];

but none of these methods seem to work out.... :(

You not assigning a property of the Obj object, but just have a local variable inside the constructor. Change like this:

function Obj(n){ = n;

Example Fiddle