Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
7 lines (4 sloc) 371 Bytes

Give your JavaScript Slot Machine some stylish images

We've already set up the images for you in an array called images. We can use different indexes to grab each of these.

Here's how we would set the first slot to show a different image depending on which number its random number generates:

$($('.slot')[0]).html('<img src = "' + images[slotOne-1] + '">');

Something went wrong with that request. Please try again.