remove character from string after a character js code example Example: js remove after character url.split('?')[0]