what if there is only one keyword in the input field?
You can still split it. If the delimiter is not found, the result is an array with a single element.
But, if this is something that you simply would never actually want to split by some delimiter, just do var arr = [str];
got it! thank you very much