Prev Demo
JavaScript
>
Split() Method To Separate Each Element In Javascript
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> </head> <body> <p>Click the below button to extract.</p> <input type="button" value="Split" onclick="Function()" /> <p id="myId"></p> <script> function Function() { var A = "Sheo Narayan is a software professional since 2000"; var r = A.split(" "); document.getElementById("myId").innerHTML = r; } </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output