How to return multiple arrays from a function in Javascript?

前端 未结 3 1884
广开言路
广开言路 2021-02-14 09:29

I have multiple arrays in a function that I want to use in another function. How can I return them to use in another function

this.runThisFunctionOnCall = functi         


        
3条回答
  •  孤街浪徒
    2021-02-14 09:52

    I would suggest making an array of arrays. In other words, a multidimensional array. That way, you can reference all arrays outside of the function within that one returned array. To learn more on how to do this, this link is quite useful: http://sharkysoft.com/tutorials/jsa/content/019.html

提交回复
热议问题