Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <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(" ");
- document.getElementById("demo").innerHTML = res;
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement