Function genRndNumString

  • Produce a random string of number, genRndNumString(7) => '7658495'.

    Usage:

    const ret1 = genRndNumString(4);
    const ret2 = genRndNumString(7);
    console.log(ret1);
    console.log(ret2);

    Output:

    9730
    2262490
    

    Parameters

    • n: number = 5

      Length

    Returns string

    Return the random string.