JavaScript Challenge Revisited: Lotto Number Generator in Chains
Matthias Reuter from United Coders proposed a JavaScript Challenge: A Lotto Number Generator which the rules follow:
Write a JavaScript function that generates random lotto numbers. This function has to return an array of six different numbers from 1 to 49 (including both) in ascending order. You may use features of ECMA-262 only, that means no Array.contains and stuff. You must not induce global variables.
The function has to look like this
var getRandomLottoNumbers = function () { // your implementation here };Minify your function using JSMin (level aggressive) and count the bytes between the outer curly braces.
Continue reading ‘JavaScript Challenge Revisited: Lotto Number Generator in Chains’ »