function dispatchStatus(status) {
const statuses = {
'accepted': () => 'This is accepted',
'rejected': () => 'This is rejected',
'pending': () => 'This is pending',
'default': () => 'Status unknown'
};
return (statuses[status] || statuses['default'])();
}
dispatchStatus('accepted')