How to display fps?

How to display FPS in my local development environment?

In .html:

            #fps {
                position: absolute;
                background-color: black;
                border: 2px solid red;
                text-align: center;
                font-size: 16px;
                color: white;
                top: 15px;
                right: 10px;
                width: 60px;
                height: 20px;
        <div id="fps">0</div>

Initialize in code:

let divFps = document.getElementById("fps");

In the render loop:

divFps.innerHTML = engine.getFps().toFixed() + " fps";

Thank you very much,that’s the answer I need