Function newLine

  • Make a new line of HTML.

    Usage:

    const ret1 = newLine('a\nb\nc');
    const ret2 = newLine('a\n\nbc');
    console.log(ret1);
    console.log(ret2);

    Output:

    a<br />b<br />c
    a<br /><br />bc
    

    Parameters

    • str: string

      The string to make a new line.

    Returns string

    A newline with br.