Create an array


#1

In chapter two of arrays where I make an array, the first step throws an error every time I try to run it, even though I’ve checked the format pretty thoroughly and logged the array successfully, logged a specific value of the array, and everything seems to be working perfectly.
This is my code:

const newYearsResolutions = ['ert', 'bba', 'axa'];
console.log(newYearsResolutions);
let listItem = newYearsResolutions[0];
console.log(listItem);

Any idea why it would have a problem with this?


#2

Running the code in chrome rather than edge seems to work. Weird.


#3

That might be because you were using ES6 syntax. I am not sure edge can run ES6, but chrome can though. It’s not your fault. IE Edge is just a bit weird.


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.