要有主动性啊。。这种问题直接百度就好了
function myDelete(str, word) {
    return Array.from(new Set(str.split(word))).join(';');
}