How to make button hidden with JavaScript

To hide the button, simply assign the none value to element’s style.display.

element.style.display = 'none';

Example:

<button id="myButton">Test Button</button>

<script>
  document.getElementById('myButton').style.display = 'none';
</script>