Next 0.1 Small Ruby snippet (no custom classes) Prev

Small Ruby snippet (no custom classes)

songs = [
    { "artist" => "Deep Purple", "title" => "Child in Time", },
    { "artist" => "Metallica", "title" => "Seek and Destroy", },
]

songs.each { |song|
    print song["title"], " (", song["artist"], ")\n"
}

Next Ruby and Perl mini comparison Prev