如何從數組中獲取所有字符串,遍歷它們,然後執行所有這些函數。使用數組內容作爲函數參數
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