To the console
and not cut a word, it is necessary that the word came into result.
This is done in regexp with conventional braces:
var name = 'QWERTY'; var arr = name.split(new RegExp('(QWE)')); console.log(arr)
The only problem here: string 'QWE' splits the string 'QWERTY' into two parts, the first of which will still be an empty string.