<button onclick="toggleText()">Click to reveal text</button>
<div id="hiddenText" style="display: none;">
  This is the hidden text that will be revealed.
</div>

<script>
function toggleText() {
  var hiddenText = document.getElementById("hiddenText");
  if (hiddenText.style.display === "none") {
    hiddenText.style.display = "block";
  } else {
    hiddenText.style.display = "none";
  }
}
</script>