例如,有这样一个文本,其中大约有 100 个,是否可以将它们放在一个数组中,还是我需要以不同的方式来做?
当您单击“新信息”按钮时,会出现有关随机国家/地区的信息,例如有关俄罗斯的信息,当您再次单击时,会出现有关另一个国家/地区的另一个随机信息,等等。,为此,需要这样一个数组,我的问题是以这种方式使用数组是否正确,或者这个想法是否有另一种选择
let x = [Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries]
等等...
你可以,这是一个例子:
新年快乐!