Question: How to apply foreach loop on an array in javascript
Answer:
const myArray = ["Green", "Red", "Black", "White"]; myArray.forEach((entry) => { console.log(entry); });
Output:
Green Red Black White
We try to provide you the best content, if there is any mistake in this article or there is any mistake in code, then let us know.
Comments
Post a Comment