Javascript examples for String:slice
Extract from position 3, and to the end:
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {// w ww . ja v a 2 s . co m var str = "Hello world!"; var res = str.slice(3); document.getElementById("demo").innerHTML = res; } </script> </body> </html>