another Math.random() problem
I'm using a Math.random() function which determines the length of a delay:
function dl() {
var pause = [1600, 1600, 2400, 2000]
dlay = Math.floor(Math.random() * pause.length); return pause[dlay]; }
which works fine.
Then I want to use another function with different delay possibilities:
function newdl() {
var paws = [400, 400, 300, 200]
dly = Math.floor(Math.random() * paws.length); return paws[dly]; }
--but this newdl() returns values from dl() !
I've tried using Math.ceil instead of Math.floor in the second function, same result.
What am I missing?