Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

later

  • Loading branch information...
commit 34995e793cba0831e94e80bd21337fbc467a1b78 2 parents c8565dc + 60c792f
@oylumboran authored
Showing with 20 additions and 9 deletions.
  1. +20 −9 musiclist.js
View
29 musiclist.js
@@ -215,18 +215,29 @@ albums:
document.write('<div id="musiclist">');
-console.log(iTunes[0]);
-console.log(iTunes[0].albums[0]);
+/*console.log(iTunes[0]);
+console.log(iTunes[0].albums[0]);*/
-document.write('<div id="alternative">' + iTunes[0].genre);
+document.write('<div id="alternative">' + iTunes[0].genre + '<ul>');
-var genre = iTunes[0];
-for(var i=0; i<iTunes[0].albums.length; i++) {
- var album = genre.albums[i];
- console.log(genre.albums.length);
- document.write('<ul>' + album.title + '</ul>');
- console.log(album.title);
+var alternative = iTunes[0];
+for(var i=0; i<alternative.albums.length; i++) {
+ var album = alternative.albums[i];
+ /*console.log(genre.albums.length);
+ console.log(album.title);*/
+ document.write('<li>' + album.title + '</li>');
+
+ for(var j=0; j<album.songs.length; j++) {
+ var song = album.songs[j];
+ console.log(song.title);
+ document.write('<li>' + song + '</li>');
+ }
+
+
+ console.log(album.songs.length);
+
}
+document.write('<ul>');
/*for(var i=0; i<iTunes.length; i++) {
Please sign in to comment.
Something went wrong with that request. Please try again.