Question: I am trying to code an `if/else` statement that writes html to a page depending on what option the `randomNumber` function generates from the `myOptions` array. I am not sure how to check the if condition as it always results to the else which writes "You lose!.....".

Goal:
Options 1 and Options 2 win, Options 3 and Options 4 lose. 

[fiddle it.](http://jsfiddle.net/troh2bh4/14/) 

```
function randomNumber(range) {
    return Math.round( Math.random() * range );
}

var myOptions = ["Option 1", "Option 2", "Option 3", "Option 4"];
myOptions = myOptions[randomNumber( myOptions.length - 1)];
alert(myOptions);

if (myOptions <= 1) {
    document.getElementById("message").innerHTML = "You win!";
} else {
    document.getElementById("message").innerHTML = "You lose! " + myOptions + " was your pick";
}

```

Answer: 
Don't use the same variable for your array of options, and the randomly selected option. Randomly assign the index, and then you can reference the appropriate string in the array when necessary.

You were reassigning the option array to one of its values, and then trying to compare that string value to a numeric value. You absolutely *could* assign `myOptions` to simply be a string and then check its value for a winning value, but I think you're trying to do something more like:

```
var myOptions = ["Option 1", "Option 2", "Option 3", "Option 4"];

var optionIndex = randomNumber(myOptions.length);
var selectedOption = myOptions[optionIndex];

alert(selectedOption);

if (optionIndex <= 1) {
    document.getElementById("message").innerHTML = "You win!";
} else {
    document.getElementById("message").innerHTML = "You lose! " + selectedOption + " was your pick";
}

```
For some reason you are checking if `myOptions <= 1` - myOptions will never be a Number, it will always be a string of one of the values.

Updated jsfiddle: <http://jsfiddle.net/troh2bh4/15/>