let myArray2 = [ “Ryu”, “Ken”, “Chun-Li”, “Cammy”, “Guile”, “Sakura”, “Sagat”, “Juri” ];
myArray2.pop();
myArray2.push(‘Fia’, ‘Hiu’);
console.log(myArray2);
const myArray2s = myArray2;
console.log(myArray2s);
let count = -1;
let myArray3s = [];
for (const myArray2 of myArray2s) {
count = count + 1;
const myArray3 = myArray2 + ‘(’ + count + ‘)’;
myArray3s.push(myArray3);
}
console.log(myArray3s);
const myString3 = myArray3s.join(’-’);
console.log(myString3);
Hello @texas-triumph
you doing great well done here some notice :
-
your email is displayed next to your name so it better to hide it from you profile page
-
no need to use console but if you did it to see the effect of each step then it’s fine
-
if you used different variable name in the for loop you would not need to create new array
for (const myArray2 of myArray2s) { \\ change myArray2 to elment
or anything else then you can use const element of myArray2
then yo would not need to create myArray2s
of course there better ways but you will learn about them
later in the course
count = count + 1;
const myArray3 = myArray2 + ‘(’ + count + ‘)’;
myArray3s.push(myArray3);
}
-
it better to put your code on any online service like codepen.io so it be easier for everyone to check it and just share link to that code
-
it better to put link to the task or topic you asking about in the post
hope that help and have a nice day 
1 Like