let a = ['Monday', 'Tuesday', 'Wednesday'];
/*
a.forEach(function(day, index, arr) {
// day will be the current day
document.body.innerHTML += day + " is at index: " + index + " from an array of " + arr.length + " elements!<br>";
});
*/
for(let i = 0; i < a.length; i+=2) {
document.body.innerHTML += a[i] + "<br>";
}
JS.Basics.Arrays.IterateOverArray.js
------------------------------------
A [Pen](https://codepen.io/Onlyforbopi/pen/gdJwQd) by [Pan Doul](https://codepen.io/Onlyforbopi) on [CodePen](https://codepen.io).
[License](https://codepen.io/Onlyforbopi/pen/gdJwQd/license).
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Arrays</title>
</head>
<body>
<p>
<b>These day names have been generated dynamically
by iterating on an array using the forEach method</b>
</p>
</body>
</html>