01. Intro Functions π©βπ«π§βπ«
functions
var brands = ["Acer", "Apple", "Sony", "Samsung"];
var heroes = ["Black Panther", "Cyborg", "Black Canary", "Donna Troy", "Huntress", "Blue Beetle", "Captain Atom"];
var booksOnMyShelf = ["Calculus Early Transcendentals", "Ravens", "The Self Illusion", "Harry Potter"];
var thingsInFrontOfMe = ["Laptop", "Beanbag", "Cats", "Slippers"];
var howIFeel = ["Sleep Deprived", "Wired on Coffee", "Excited"];
function consoleInside(arr) {
for (var i = 0; i < arr.length; i++) {
console.log(arr[i]);
}
console.log("---------");
}
consoleInside(brands);
consoleInside(heroes);
consoleInside(booksOnMyShelf);
consoleInside(thingsInFrontOfMe);
consoleInside(howIFeel);
no-functions
var brands = ["Acer", "Apple", "Sony", "Samsung"];
var heroes = ["Black Panther", "Cyborg", "Black Canary", "Donna Troy", "Huntress", "Blue Beetle", "Captain Atom"];
var booksOnMyShelf = ["Calculus Early Transcendentals", "Ravens", "The Self Illusion", "Harry Potter"];
var thingsInFrontOfMe = ["Laptop", "Beanbag", "Cats", "Slippers"];
var howIFeel = ["Sleep Deprived", "Wired on Coffee", "Excited"];
for (var i = 0; i < brands.length; i++) {
console.log(brands[i]);
}
console.log("---------");
for (var j = 0; j < heroes.length; j++) {
console.log(heroes[j]);
}
console.log("---------");
for (var k = 0; k < booksOnMyShelf.length; k++) {
console.log(booksOnMyShelf[k]);
}
console.log("---------");
for (var l = 0; l < thingsInFrontOfMe.length; l++) {
console.log(thingsInFrontOfMe[l]);
}
console.log("---------");
for (var m = 0; m < howIFeel.length; m++) {
console.log(howIFeel[m]);
}
console.log("---------");