setel ulang fungsi javascript
document.getElementById("form").reset();
Undefined
document.getElementById("form").reset();
document.querySelector("form").reset();
<form id='myform'>
...
</form>
const submitForm = () => {
...some API call
document.getElementById("myform").reset();
}