Hi I am wondering how to return output of array horizontally instead of vertically I have tried a few different ways and I cannot get it to work. I know you can use .join and not use foreach but I am wondering if there is a way with foreach. I also know you can output it as an array or an object but that would have {} or [] in the output.
const studentsRow1 = ["Rachelle", "Jacob", "Jerome", "Greg", "Matt", "Walt"];
// Method 1
studentsRow1.forEach(function(student){
console.log(student)
// Method 2
studentsRow1.forEach(student => console.log (`${student}`))
Current Output
Rachelle
Jacob
Jerome
Greg
Matt
Walt
Expected output
Rachelle, Jacob, Jerome, Greg, Matt, Walt