This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const verses = [ | |
{animal: 'cow', word: 'moo'}, | |
{animal: 'pig', word: 'oink'}, | |
{animal: 'duck', word: 'quack'} | |
] | |
for (const verse of verses) { | |
console.log(`Old MACDONALD had a farm | |
E-I-E-I-O | |
And on his farm he had a ${verse.animal} |