on-internet
← Community

How to loop through the items of an array in JavaScript?

Stack Overflow ·

In Java, you can use a for loop to traverse objects in an array as follows: String[] myStringArray = {"Hello", "World"}; for (String s : myStringArray) { // Do something } Can I do the same in JavaScript?

Comments

Sign in or sign up to comment and upvote.

No comments yet.