Please check out my code incrementer

I recently developed code that can run as a function parameter but I’m not quite sure how vulnerable it is to hacks and/or cheats. Also, is there anything I could improve? Thanks

const h1 = document.getElementById('hi')

world = "world";

function testCode(codeEntered) {
    var code = codeEntered;
  var run = code *= 1;
  return(run);
}
<button onclick="testCode(h1.textContent = world)">
Test
</button>

<h1 id="hi">
Hello
</h1>