javascript replace text within dom

JavaScript
document.body.innerHTML = document.body.innerHTML.replace('hello', 'hi');
Source

Also in JavaScript: