JSOM Approve / Reject Task

Tasks can be approved with the following javascript code;

CODE



Tasks can be rejected with the following javascript code;

CODE