【发布时间】:2020-02-21 11:15:55
【问题描述】:
我将两个数组推入一个数组但不能将它们用作字符串,这导致以下关于一个数组中的两个数组:
Array(0) [] //This is empty array that I create before and push these two array bellow to them
length:2
0:Array(1) ["cfdb9868-0f69-5781-b1e4-793301280788"]
1:Array(1) ["cfdb9868-0f69-5781-b1e4-793301280788"]
我创建了一个用于访问它们的方法,但我可以!我写了这段代码“
for(var index = 0 ; index < Array.length ; ++index) {
let Each_String_In_Brackets = Array[index] ;
console.log(Each_String_In_Bruckets);
}
为什么会这样!
我的意思是为什么当我们将数组推入空数组时无法访问它们! 我想访问它们的内容,每个括号中都有一个字符串。
【问题讨论】:
-
可以访问。你的意思是你不能?
-
使用我的代码我无法访问它们,我如何访问它们?
标签: javascript arrays push