//1 if (typeof yourFunctionName === 'function') { yourFunctionName(); } //2 'textContent' in document.body