const actions = {
'1': ['processing'],
'2': ['fail'],
'3': ['fail'],
'4': ['success'],
'5': ['cancel'],
'default': ['other']
}
const returnElements = (status) => {
let action = actions[status] || actions['default'], LogName = action[0];
sendLog(LogName)
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter