How javascript foreach works with multi-dimensional arrays?

后端 未结 3 1170
生来不讨喜
生来不讨喜 2021-02-09 17:58

I was playing a bit with javascript and found out (at least for me) strange behaviour when dealing with multi-dimensional arrays via a foreach loop. So I have this piece of code

3条回答
  •  野的像风
    2021-02-09 18:33

    I use this dump() function all the time to debug my multi-dimensional arrays.

    http://binnyva.blogspot.com/2005/10/dump-function-javascript-equivalent-of.html

    If you have questions about implementing it, let me know.

提交回复
热议问题