How to make the page refresh in JavaScript

Simply use:

window.location.reload();

Example:

Make the page refresh on button click in JavaScript.

<button onclick="refreshPage()">Refresh</button>

<script>
    function refreshPage() {
        window.location.reload();
    }
</script>

Output: