如何从数组中获取所有字符串,遍历它们,然后执行所有这些函数。使用数组内容作为函数参数
var array = ["Congrats!", "Sorry you failed"]
responses.get(array).function
// I want it to basically do is responses.get("Congrats!").function
// and responses.get("Sorry you failed").function both but simpler
谷歌'Function.prototype.apply' – Pointy
还利用扩展语法https://developer.mozilla.org/en/ docs/Web/JavaScript/Reference/Operators/Spread_operator – locrizak
foreach - https://www.w3schools.com/jsref/jsref_forEach.asp – mchan