I have simple one line function. Function received argument as an object and I am assigning a value to that object but it is alerting undefined. What is wrong with the code.
function custom(obj){
obj.name="johnson";
}
var j= new custom(new Object());
alert(j.name)