var str = "This is an amazing sentence."; var words = str.split(" "); console.log(words); //["This", "is", "an", "amazing", "sentence."]