Created
June 2, 2014 13:53
-
-
Save essejose/8ee2fa3000fd1bbfbc18 to your computer and use it in GitHub Desktop.
Revisions
-
essejose created this gist
Jun 2, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ // REQUIRED function getRandom(x, y) { return Math.floor(Math.random() * (y - x + 1)) + x } // Print // var print = function (val) { var cartas = ['carta1','carta2','carta3','carta4','carta5', 'carta6'] alert(cartas[val]) } // Function Call print(getRandom(0, 5))