i want to run a function, inside another function dynamically...
let say :
<script>
var x = function(r,s){
r(s);
}
var a = function(item){
alert("aA");
}
var b = function(item){
alert("bB");
}
</script>
is this possible? i take "r" from function x's argument as a function name, and i want to run it.
if r=a, then it will trigger function a()
and if r=b, function b triggered instead...
how could i do that?