Arrays Section 8/9 Step 2


#1

Below your code from Step 1, reassign condiments to be an array that contains a single string.

Log the result to the console.
https://www.codecademy.com/courses/learn-javascript-arrays/lessons/arrays/exercises/let-const-arrays?action=lesson_resume&course_redirect=introduction-to-javascript

I use the join() method and it spits out: Ketchup, Mustard, Soy Sauce, Sriracha, BBQ Sauce

However, it keeps saying I haven’t passed, anyone tell me what I’m doing wrong. I looked at toString() as well, but it should be join() I believe.

let string = condiments.join(’, ');
console.log(string);


#2

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