Before
let b;
switch (a) {
case '#':
b = 'one';
break;
case '##':
b = 'two';
break;
default:
b = 'unknown';
}
After
let b = ({
'#': 'one',
'##': 'two'
})[a] ?? 'unknown';
For further actions, you may consider blocking this person and/or reporting abuse
Sotiris Kourouklis -
Limon -
Amit Kumar Rout -
Victoria -
Latest comments (0)