I'm studying this code, diafol, and it uses a ton of notation I don't know. typeof I can figure out, but the double pipe means "or," doesn't it? How does that work here? The <= is something I don't know, either. The use of the pipe on line 16 is also something I don't understand. Lines 18 and 19 also seem to contain XML rather than JS. Please elaborate.
1)Line 6, j = Math.abs(Math.random() * 10);, the Math.abs() does nothing for you. The value returned from Math.random() is between 0 and 1 (a float), so it is always a positive number anyway.
2)Line 11, oneString=String(oneArray[Math.abs(Math.random() * 10)]); would almost always produce undefined. (Also Math.abs() does nothing for you either.) The reason is that Math.random() returns a float value between 0 and 1 and most likely not to be able to multiply with your selected number and produces an integer (number). An array index is an integer (number) which has no decimal. As a result, you attempt to access a non-existing array index.
var rand = Math.random() * 10;
// let say Math.random() returns 0.23453
// now your rand is 2.3453
// as a result, an array of array[rand] will give you "undefined" value
What you need to do is to use Math.floor() which truncates any decimal produced by the Math.random().