var reg = "Паша, Петя"; 

How to cut out regular words 2 words and add them to new variables?
Words can be different.

    1 answer 1

     var string = "Паша, Петя, Вова"; names = string.split(', '); console.log(names[2] + ' красаучиг'); // Вова красаучиг 
    • Thank you, very simple, as I thought)) - Karalahti