1//create an array like so:
2var colors = ["red","blue","green"];
3
4//you can loop through an array like this:
5for (var i = 0; i < colors.length; i++) {
6 console.log(colors[i]);
7}
1special_dates = [];
2special_dates.push(new Date('2021/02/12').getTime());
3special_dates.push(new Date('2021/02/13').getTime());
4special_dates.push(new Date('2021/02/14').getTime());
5
6
7for (var i = 0; i < special_dates.length; i++) {
8 console.log(special_dates[i]) ;
9}
10
1fruits = ["Banana", "Orange", "Apple", "Mango"];
2text = "<ul>";
3for (i = 0; i < fruits.length; i++) {
4 text += "<li>" + fruits[i] + "</li>";
5}