<!DOCTYPE html>
<html>
<body>

<p>Click the button to display the array value after the split.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
    var str = "How are you doing today?";
    var res = str.split();
    document.getElementById("demo").innerHTML = res;
}
</script>

</body>
</html>