let abuse = ['блин', 'черт'];
let inp = document.querySelector('#text');
let out = document.querySelector('#textOut');
inp.addEventListener ('blur', () => {
let words = inp.value.split(' ');
words.forEach(element => {
if(!(abuse.indexOf(element) == -1)) {
element = '***';
}
});
out.innerHTML = words.join(' ');
inp.value = '';
})