js remove everything after character and including character code example Example: js remove after character url.split('?')[0]