4 ms·
I use this pattern frequently, with minor changes: function getArrow(direction) { const missing = '¯\\_(ツ)_/¯' const arrows = { left: '<--',
by hunterloftis 5y ago
I use this pattern frequently, with minor changes:
function getArrow(direction) {
const missing = '¯\\_(ツ)_/¯'
const arrows = {
left: '<--',
right: '-->',
}
return arrows[direction] || missing
}
- molszanski 5y agoYes, I use it exactly like that.