Example of for-of block in Javascript ES6
While in previous tutorials, we used the forEach method to iterate through all the elements of an array; now we can use the for-of construct like this …
And you get the results as expected.
While in previous tutorials, we used the forEach method to iterate through all the elements of an array; now we can use the for-of construct like this …
And you get the results as expected.