Pulling variables into Javascript

Mar 12, 2018

Assistance please.  I know zero about javascript, other than being able to achieve things by copying a piece of code. I want to create a random integer and I have this code:

var randomnumber = Math.floor((Math.random()*10)+1);
var player = GetPlayer();

In this case, it creates a random number between 1 and 10. However, the maximum number is a variable previously set (called "Product").

Can anyone advise how to change the code so that it recognises my Product variable?


1 Reply

This discussion is closed. You can start a new discussion or contact Articulate Support.