For example click event:
elem.onclick = function
The specification of the Promise then method:
new Promise().then(onFulfilled, onRejected)
This is a naming convention: on means execute the function when something happens .
For example click event:
elem.onclick = function
The specification of the Promise then method:
new Promise().then(onFulfilled, onRejected)
This is a naming convention: on means execute the function when something happens .