Js Equivalent of Ruby send method
Do you remember we talked about ruby’s send method here. It is used to call a ruby function from string having same value as function name.
There is js equivalent of the same:
// defining the function
var apple = function(){
console.log('apple');
}
eval('apple()') // => apple
Reference:
Leave a comment