randomly split up substrings
<p>I am trying to split up substring charaters from a string from what i have tryed so far has failed even looping within a loop.</p>

<p>An example result from string "1234567890" the output could look like as follows</p>

<pre><code>12
345
6
7890
</code></pre>

<p>.</p>

<pre><code>var randomChar = ""
var str = "123456789";

for (var j = 0; j &lt; str.length; j++) {
randomChar = Math.floor(Math.random() * 3) + 1;

console.log(str.substr(j, randomChar));
}
</code></pre>
