Issue 1:
Summary

This isn't necessarily a bug, but it's an interesting find. It's probably even intentional.

Anyway, instead of rewriting the Math.floor(Math.random() * (1 - 3 + 1)) + 1 code three times, I wanted to try writing a custom function to generate the numbers:

function generateRandomNumber(min, max) {
return Math.floor(Math.random() * (min - max + 1)) + 1;
}

slotOne = generateRandomNumber(1, 3);
...

The result is the same, but the last test is marked wrong because I didn't retype the random number generation line. No big deal! Just thought I would make mention of it.

Code

Challenge Waypoint: Create a JavaScript Slot Machine has an issue.

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.93 Safari/537.36.

Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

<script>
function runSlots(){
var slotOne;
var slotTwo;
var slotThree;

var images = ["http://i.imgur.com/9H17QFk.png", "http://i.imgur.com/9RmpXTy.png", "http://i.imgur.com/VJnmtt5.png"];

// Only change code below this line.
function generateRandomNumber(min, max) {
return Math.floor(Math.random() * (min - max + 1)) + 1;
}
slotOne = generateRandomNumber(1, 3);
slotTwo = generateRandomNumber(1, 3);
slotThree = generateRandomNumber(1, 3);

// Only change code above this line.

$(".logger").html("");
$(".logger").html("Not A Win")

if(slotOne !== undefined && slotTwo !== undefined && slotThree !== undefined){
$(".logger").html(slotOne + " " + slotTwo + " " + slotThree);
}
return [slotOne, slotTwo, slotThree];
}

$(document).ready(function(){
$(".go").click(function(){
runSlots();
});
});
</script>

<div>
<div class = "container inset">
<div class = "header inset">
<img src="https://s3.amazonaws.com/freecodecamp/freecodecamp_logo.svg.gz" alt="learn to code javascript at Free Code Camp logo" class="img-responsive nav-logo">
<h2>FCC Slot Machine</h2>
</div>
<div class = "slots inset">
<div class = "slot inset">

</div>
<div class = "slot inset">

</div>
<div class = "slot inset">

</div>
</div>
<br/>
<div class = "outset">
<button class = "go inset">
Go
</button>
</div>
<br/>
<div class = "foot inset">
<span class = "logger"></span>
</div>
</div>
</div>

<style>
.container {
background-color: #4a2b0f;
height: 400px;
width: 260px;
margin: 50px auto;
border-radius: 4px;
}
.header {
border: 2px solid #fff;
border-radius: 4px;
height: 55px;
margin: 14px auto;
background-color: #457f86
}
.header h2 {
height: 30px;
margin: auto;
}
.header h2 {
font-size: 14px;
margin: 0 0;
padding: 0;
color: #fff;
text-align: center;
}
.slots{
display: flex;
background-color: #457f86;
border-radius: 6px;
border: 2px solid #fff;
}
.slot{
flex: 1 0 auto;
background: white;
height: 75px;
margin: 8px;
border: 2px solid #215f1e;
border-radius: 4px;
}
.go {
width: 100%;
color: #fff;
background-color: #457f86;
border: 2px solid #fff;
border-radius: 2px;
box-sizing: none;
outline: none!important;
}
.foot {
height: 150px;
background-color: 457f86;
border: 2px solid #fff;
}

.logger {
color: white;
margin: 10px;
}

.outset {
-webkit-box-shadow: 0px 0px 15px -2px rgba(0,0,0,0.75);
-moz-box-shadow: 0px 0px 15px -2px rgba(0,0,0,0.75);
box-shadow: 0px 0px 15px -2px rgba(0,0,0,0.75);
}

.inset {
-webkit-box-shadow: inset 0px 0px 15px -2px rgba(0,0,0,0.75);
-moz-box-shadow: inset 0px 0px 15px -2px rgba(0,0,0,0.75);
box-shadow: inset 0px 0px 15px -2px rgba(0,0,0,0.75);
}
</style>

Issue 2:
Challenge http://freecodecamp.com/challenges/waypoint-create-a-javascript-slot-machine has an issue. Please describe how to reproduce it, and include links to screenshots if possible.

The example in the first screenshot should pass, but fails because the last test checks to see if the random number formula appears exactly three times.

It's more efficient to write a single function that returns a random number and then have each variable call that function.

In fact, it doesn't matter where the formula appears, as long as it appears three times. Here, I passed by repeating it twice in comments.