<html>
<body>
<p>Click the button to display the array values 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(" ", 3);
document.getElementById("demo").innerHTML = res;
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_split4 by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 05 Jun 2019 14:03:07 GMT -->
</html>