I have two list
men=['x','y','z']
women=['a','b','c'];
and two vabriable to show in html
selectedMan;
selectedWoman;
i want to create a common select method
select(index,source,destination){
destination=source[index];
}
function call
this.select(2,this.men,this.selectedMan);
this.select(1,this.women,this.selectedWoman)
html
<p>Welcome to team {{selectedMan}}</p>
<p>Welcome to team {{selectedWoman}}</p>
but in html only show welcome to team