I've created a rock, paper, scissors game to learn JS and jQuery with. What I'm trying to figure out is how to call the same function on button click, so that the number will change, giving a different result for the game.

I've made a jsFiddle demo for this here:

<https://jsfiddle.net/iKaleb/v1kbxg2g/3/>

Essentially, in the fiddle example, I'd like to click the blue box and the computers choice would change every time. `compChoice()` is the random number generator, but when I call it again by clicking the button, it doesn't change the computers choice.

Any help with this will be greatly appreciated!

```
var player = "Rock";
var computer = compChoice();

function compChoice() {
    var compMath = Math.floor(Math.random() * 3) + 1;

    switch (compMath) {
        case 1: 
            pick = "Rock"
            break;
        case 2:
            pick = "Paper"
            break;
        case 3:
            pick = "Scissors"
            break;
    }

    return pick;
}

function vsChoice() {
    if (player === "Rock") {
        if (computer === "Scissors") {
            console.log("Win.");
        } else if (player === computer) {
            console.log("Tie.");
        } else {
            console.log("Lose.");
        }
    }

    if (player === "Paper") {
        if (computer === "Rock") {
            console.log("Win.");
        } else if (player === computer) {
            console.log("Tie.");
        } else {
            console.log("Lose.");
        }
    }

    if (player === "Scissors") {
        if (computer === "Paper") {
            console.log("Win.");
        } else if (player === computer) {
            console.log("Tie.");
        } else {
            console.log("Lose.");
        }
    }
}

$('#box').on('click', function() {
    console.log("Players Choice: " + player);
    console.log("Computer Choice: " + computer);
    vsChoice();
});

```