简体   繁体   English

使用Javascript时数组出现问题

[英]I have a issue with an array when using Javascript

I have this problem and I keep putting them in the correct order but my application keeps saying it's wrong, this is all it is. 我遇到了这个问题,我一直把它们放在正确的顺序中,但是我的应用程序一直在说这是错误的,仅此而已。 The question is: Declare a variable education and assign it to an array containing the name of your college/university, field of study, and an integer which is your year of (anticipated) graduation. 问题是:声明一个变量的教育并将其分配给一个数组,该数组包含您的大学/大学的名称,学习领域以及一个整数,该整数表示您(预计)毕业的年份。 Make sure these elements are included in the initialized array in that order. 确保按此顺序将这些元素包括在初始化的数组中。

SO I have it like this var education = [Cerritos College, Computer Science, 2018]; 所以我有这样的var education = [Cerritos College, Computer Science, 2018]; I tried this way too! 我也尝试过这种方式! var education = ['Cerritos College', 'Computer Science', '2018']; Nothing works though. 没什么用。

That is all my code. 那就是我的全部代码。

Year of graduation needs to be an integer, no quotes. 毕业年份必须是整数,不带引号。 Try this: 尝试这个:

var education = ['Cerritos College', 'Computer Science', 2018];

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM