Cómo crear una ventana emergente en la pantalla central JavaScript

<!DOCTYPE html>
<html>
     
<head> 
    <title> 
        Centered popup window
        on the screen
    </title>
</head>
 
<body>
    <h1>GeeksforGeeks</h1>
     
    <p>
        Centered popup window
        on the screen
    </p>
     
    <script>
        function createPopupWin(pageURL, pageTitle,
                    popupWinWidth, popupWinHeight) {
            var left = (screen.width - popupWinWidth) / 2;
            var top = (screen.height - popupWinHeight) / 4;
             
            var myWindow = window.open(pageURL, pageTitle,
                    'resizable=yes, width=' + popupWinWidth
                    + ', height=' + popupWinHeight + ', top='
                    + top + ', left=' + left);
        }
    </script>
     
    <button onclick = "createPopupWin('https://www.geeksforgeeks.org',
            'GeeksforGeeks Website', 1200, 650);">
        GeeksforGeeks
    </button>
</body>
 
</html>
Poor Puma