Purchase Solution

Java Script program: Song, Publishing Year

Not what you're looking for?

Ask Custom Question

Create a JavaScript program that declares and prints an array that includes at least 20 of your favorite songs. For each song, determine the best means for storing the year it was published. Using JavaScript, print each song's name along with the year it was published. The print logic must use a loop. The song data really do not matter; the programming does.

Purchase this Solution

Solution Summary

Solution uses an array of arrays for storing the songs and the corresponding years when the respective songs were published, but it also discusses two more approaches to store songs data.

Solution Preview

You can load attached 536802.html in any browser where you have Javascript enabled.

Attached Javascript solution is one of the many ways in which the goal can be achieved. It uses an array of arrays for storing the songs and the corresponding years when the respective songs were published. Each element of the songs array is an array of two elements with first element being the song name and second element being the year it was published in.

Please edit and populate the songs array with as many entries as you want. Solution has few sample entries for demonstrating as to how the songs information should be stored.

Instead of using an array of arrays, we could ...

Purchase this Solution

Free BrainMass Quizzes
Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.