i want to pass a string to a javascript function and use it as an attribute like this :
function object (){
this.somevalue = 1;
this.somevalue2 = 1;
this.updateAttribute = function(name,value){
this.{name} = value;
}
}
can it be done ? Thank You .