-
-
Notifications
You must be signed in to change notification settings - Fork 44k
Waypoint: Create a JavaScript Slot Machine #4564
Copy link
Copy link
Closed
Description
The fourth test in this is checking for syntax, and while it is an important check, I believe it can be written a different way that allows for different variations of this syntax while still checking that they are making the calls properly. I'm a relatively new camper, and I can't figure out how to insert it into my fork of the master, but can somebody at least look at this and see if it would work?
assert((function(){var i = 0;Math.random = function(){var randoms = [0.7359089243691415,0.4609197387471795,0.3553516734391451];return randoms[i++];};if(runSlots[0] == 3 && runSlots[1] == 2 && runSlots[2] == 2){return 1;}else{return false;}})(),'You should have used <code>Math.floor(Math.random() * (3 - 1 + 1)) + 1;</code> three times to generate your random numbers.')
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels