I followed a lot of tutorials about the exploitation of UAF vulnerabilities, but there was never explained how to find and detect UAF vulnerabilities in JavaScript or HTML (i.e. with a static analysis).
My question is: how to reverse engineer JavaScript functions to see if an object was freed, by this function, and with which function I can use it again (after it was freed) to provoke a use after free issue?