find first word javascript code example
Example: get the first word of a string javascript
let sentence = "The big brown fox"
let word = sentence.split(" ")[0]
console.log(word) // The
let sentence = "The big brown fox"
let word = sentence.split(" ")[0]
console.log(word) // The