Created
May 23, 2015 16:28
-
-
Save halldorel/bb10d26212cc9e8b1d5c to your computer and use it in GitHub Desktop.
Hvernig velja á herbergi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function shuffle(o){ for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x); return o; } | |
var couples = ["SM", "KÁ", "HH"]; | |
var rooms = ["MB", "Hjónó", "Bónó"]; | |
couples = shuffle(couples); | |
rooms = shuffle(rooms); | |
for (var i in couples) { | |
console.log(couples[i] + " gista í " + rooms[i] + " og hafa massa gaman"); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment