It tests, whether the substring is present in any part of the whole text such as in the beginning, middle, or end. The first is to disregard blanks. For example: String str = "abc"; is equivalent to: char data[] = {'a', … Home; About; Schedules; News & Events; Contact Us using below JavaScript code, we can also remove whitespace character from a string. let str = "Apple, Banana, Kiwi"; var output = XmlService.getRawFormat ().format (menu); return HtmlService.createHtmlOutput (output); } We fetch the HTML through UrlFetch. function removeLastCharacter() { var str = 'tracedynamics'; str = str.substr(0,str.length-1); console.log(str); } Output: tracedynamic. The replace () method does not change the original string. Was this tutorial helpful ? JavaScript String with quotes Let me show you: It is used to extract a part of the string. Si se omite el indiceB, substring extrae caracteres hasta el final de la cadena. substring extrae caracteres desde indiceA hasta indiceB sin incluirlo. Definition and Usage. indexA − An integer between 0 and one less than the length of the string. Google 1. JavaScript String replace The script runs nightly, queries Google for my keywords and then populates blank cells in a Google Spreadsheet.