I'm trying to generate a random outcome based on an array, however I'm getting this error when I log it out, any ideas why?
const hockeyPlayer = {
position: "goalie",
action: ["stops the shot", "gives up a goal"],
outcome: [Math.floor(Math.random() * this.action.length)],
shot(){
console.log(`The ${this.position} ${this.outcome}`)
}
};
hockeyPlayer.shot();