关闭。这个问题需要更加关注。它目前不接受答案。
**想改进这个问题吗?**编辑这篇文章,更新这个问题,使它只关注一个问题。
三天前关门。
改进这个问题
数组中的项取决于用户输入或通过api从某个源派生的文本。 \n
由于我们无法知道函数将返回多少项,因此无法正常工作。下面的代码只是假设,所以请假设它不会工作。
const arrayItems = getItems();
//getting the items using a function an storing it into a variable
console.log(arrayItems)
// this can be anything like return arrayItems, I just used console.log since it's easier.
暂无答案!
目前还没有任何答案,快来回答吧!