How to add JavaScript to form on load in Dynamics 365

How to add a JavaScript event to a form in Dynamics 365. Step by step guide using the Power Apps admin center.