With teh following code, if I put picnames first, it wont work because
the other variables havent yet been defined, correct? That seems to be
the case. What I want to know is whether that is a feature or a bug.
var r1 = new Array(
"Anna",
"Jane",
"Hannah",
"Nayomi"
);
var r2 = new Array(
"My name is ",
"I'm "
);
//
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
var d1 = r1[Math.floor(Math.random() * 4)];
var d2 = r2[Math.floor(Math.random() * 2)];
//
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
var picnames = new Array(
"Good morning.",
"Good morning.",
"What's your name?",
d2 + d1 + ".",
"Thank you.",
"You're welcome."
);
--
--
Fabian
Visit my website often and for long periods!
http://www.lajzar.co.uk