我的一系列方法是这样的:
onUpdateAcrossDown ( findAcrossAndDownWords( across_index, down_index ) )
我想重用findAcrossAndDownWords
,所以我希望它返回我的两个对象,如果需要,我可以将它们传递给其他方法。
findAcrossAndDownWords: function(across_index, down_index) {
across_word = across_index[0] // <-- not real, just representing that it becomes an object here.
down_word = down_index[0]
return [across_word, down_word] // <-- This is where my problem is. Not sure how to return a double param for my parent function.
}
问题是,return
我使用的没有正确通过across_word, down_word
。
onUpdateAcrossDown: function(across_word, down_word) {
// How do I get across_word and down_word here properly?