Pure Programmer
Blue Matrix


Cluster Map

Project: Twelve Days of Christmas Lyrics

Compute the full lyrics to the song Twelve Days of Christmas. Write a function to print a verse given the verse number. Use an array to hold the unique parts of each verse.

See [[The Twelve Days of Christmas (song)]]

Output
$ node TwelveDaysOfChristmasLyrics.js On the first day of Christmas my true love sent to me, a partridge in a pear tree! On the second day of Christmas my true love sent to me, two turtle doves, and a partridge in a pear tree! On the third day of Christmas my true love sent to me, three french hens, two turtle doves, and a partridge in a pear tree! On the fourth day of Christmas my true love sent to me, four calling birds, three french hens, two turtle doves, and a partridge in a pear tree! On the fifth day of Christmas my true love sent to me, five gold rings, four calling birds, three french hens, two turtle doves, and a partridge in a pear tree! On the sixth day of Christmas my true love sent to me, six geese a-laying, five gold rings, four calling birds, three french hens, two turtle doves, and a partridge in a pear tree! On the seventh day of Christmas my true love sent to me, seven swans a-swimming, six geese a-laying, five gold rings, four calling birds, three french hens, two turtle doves, and a partridge in a pear tree! On the eighth day of Christmas my true love sent to me, eight maids a-milking, seven swans a-swimming, six geese a-laying, five gold rings, four calling birds, three french hens, two turtle doves, and a partridge in a pear tree! On the ninth day of Christmas my true love sent to me, nine ladies dancing, eight maids a-milking, seven swans a-swimming, six geese a-laying, five gold rings, four calling birds, three french hens, two turtle doves, and a partridge in a pear tree! On the tenth day of Christmas my true love sent to me, ten lords a-leaping, nine ladies dancing, eight maids a-milking, seven swans a-swimming, six geese a-laying, five gold rings, four calling birds, three french hens, two turtle doves, and a partridge in a pear tree! On the eleventh day of Christmas my true love sent to me, eleven pipers piping, ten lords a-leaping, nine ladies dancing, eight maids a-milking, seven swans a-swimming, six geese a-laying, five gold rings, four calling birds, three french hens, two turtle doves, and a partridge in a pear tree! On the twelfth day of Christmas my true love sent to me, twelve drummers drumming, eleven pipers piping, ten lords a-leaping, nine ladies dancing, eight maids a-milking, seven swans a-swimming, six geese a-laying, five gold rings, four calling birds, three french hens, two turtle doves, and a partridge in a pear tree!

Solution