0
Explain Output
const len = ["SoloLearn", "Learn", "Hello", "Love"]; for (let i = 1; i < len.length; i++){ console.log(len.reverse()[i]); } The output for this code is Hello Hello SoloLearn. Please explain logic for the same.
1 Answer
const len = ["SoloLearn", "Learn", "Hello", "Love"]; for (let i = 1; i < len.length; i++){ console.log(len.reverse()[i]); } The output for this code is Hello Hello SoloLearn. Please explain logic for the same.