angular substring api description text in html code example Example: substring javascript var str = "Hello world!"; var res = str.substring(1, 4); //ell