iris string javascript dari index ke ruang angkasa
const data ="Hello my name is Hastings"
data = data.slice(0, data.indexOf(" "));
console.log(data)
//Output = "Hello"
Hastings Keith