Answers for "how to erase every string after a certain word javascript"

2

remove word from string javascript

var str = "delete-this"
str.replace('delete-','') // str = "this"
Posted by: Guest on July-18-2021
-1

javascript str remove everything after character

var URL = "http://stackoverflow.com/questions/10767815/remove-everything-before-the-last-occurrence-of-a-character";
alert(URL.substring(0, URL.lastIndexOf("/") + 1));
Posted by: Guest on August-15-2021

Code answers related to "how to erase every string after a certain word javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language