Exploring JavaScript and Storyline 360: Randomness (#5)

Welcome to post #5 in my Exploring JavaScript and Storyline 360 series. In today’s post, I wanted to talk about using the random number generator in JavaScript. This JavaScript snippet is pretty easy to use once you understand what it’s doing.

var randomNumber = Math.floor(Math.random( )*12+1);
var player = GetPlayer();
player.SetVar(“randnum”,randomNumber);

 

Why Generate Random Numbers?

Read the full story by

Tags:

RELATED READS
Articulate Storyline Template Of The Week – Classification: Tab Interactivity What to Charge as an e-Learning Freelancer (and How to Compete with Discounters who Undercharge)
We are updating our Privacy Policy, so please make sure you take a minute to review it. As of May 25, 2018 your continued use of our services will be subject to this new Privacy Policy.
Review Privacy Policy OK