User Tools

Site Tools


javascript:substring

This is an old revision of the document!


JavaScript - SubString

Extract starting at position 2, and extract the rest of the string:

var str = "Hello world!";
var res = str.substring(2);

Result:

llo world!
javascript/substring.1468776635.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki