String String JavaScript z indeksu do przestrzeni
const data ="Hello my name is Hastings"
data = data.slice(0, data.indexOf(" "));
console.log(data)
//Output = "Hello"
Hastings Keith