访问二维数组内容时出现未定义的错误 [英] Undefined error when accessing 2-D array contents
本文介绍了访问二维数组内容时出现未定义的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
每次我尝试访问以下数组的内容时,都会返回它是未定义的。我尝试了多种语法访问数组的变体,但每次都会遇到不同的错误。
当我尝试按照下面列出的方式进行操作时,我得到了之前谈过的未定义错误。
代码:
Hi,
Every time I try to access the contents of the following array it returns that it is undefined. I have tried multiple variations on accessing the arrays syntax wise but get different errors every time.
When I try to do it the way listed below I get the undefined error I talked about before.
Code:
展开 | 选择 | Wrap | 行号
推荐答案
第6行,你要覆盖你的数组变量。
line #6, you?re overwriting your array variable.
@Dormilich
那个'是我的初始化行,该数组在此之前的内容中没有任何内容。
@Dormilich
That''s my initializing line, the array has nothing in its contents before that point.
无关紧要。无论以前是什么,在第6行之后它都是不同的。
that doesn’t matter. whatever it has been before, after line #6 it’s something different.
这篇关于访问二维数组内容时出现未定义的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文