leave balance js