Obtenha a primeira palavra de string js
let myStr = "Hello World"
let firstWord = myStr.split(" ")[0]
Borma
let myStr = "Hello World"
let firstWord = myStr.split(" ")[0]
var x = 'some string';
alert(x.charAt(0)); // alerts 's'