I have a simple object and I want to call a particular property by passing a property name through a function:
spit(name);
function spit(value) {
var test = new Object();
test.name = "Bill";
test.number = 24;
console.log(test.value);
}
The above code should return "Bill". How is this possible?