How to remove after certin acurance of specific character in string javascript code example Example: js remove after character url.split('?')[0]