Solving a simple Javacript question using for loop and array
I am trying to solve this question using Javascript for loop and array but got stuck halfway. Need some guidance. So far what I came up with is this: const array1 = [‘S’,’A’,’I’,’N’,’S’]; var text=""; for(let y = 0; y < array1.length; y++){ text += array1[y]; console.log(text); } The output are: S SA SAI SAIN… Read More Solving a simple Javacript question using for loop and array