Javascript examples for String:split
Separate each character, including white-space:
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {// w w w. j a v a 2 s . com var str = "The following code shows how to ?"; var res = str.split(""); document.getElementById("demo").innerHTML = res; } </script> </body> </html>