I have been reading online and some places say it isn\'t possible, some say it is and then give an example and others refute the example, etc.
How do I dec
var playList = [
['I Did It My Way', 'Frank Sinatra'],
['Respect', 'Aretha Franklin'],
['Imagine', 'John Lennon'],
['Born to Run', 'Bruce Springsteen'],
['Louie Louie', 'The Kingsmen'],
['Maybellene', 'Chuck Berry']
];
function print(message) {
document.write(message);
}
function printSongs( songs ) {
var listHTML;
listHTML = '';
for ( var i = 0; i < songs.length; i += 1) {
listHTML += '- ' + songs[i][0] + ' by ' + songs[i][1] + '
';
}
listHTML += '
';
print(listHTML);
}
printSongs(playList);