I have this line
var str = "example1 example2 example3 .... exampleN";
Well, you understand the meaning. I do not know how many words in the string str. I need to choose only the first (in the sense of the first space). To after funkts. I got "example1".