trimEndRemoves the given substring from a string's end.trimEnd(str, substring)CopyParameters#str: Target stringsubstring: string that needs to be removed from the end of strReturns#modified string