switch
const signal = 'red';
switch(signal){
case 'red':(コロン)
cosole.log('stop');
break;
case 'yellow':
cosole.log('caution');
break;
case 'blue':
case 'green':
console.log('go');
break;
default:(コロン)
console.log('wrong signal');
}
const signal = 'red';
switch(signal){
case 'red':(コロン)
cosole.log('stop');
break;
case 'yellow':
cosole.log('caution');
break;
case 'blue':
case 'green':
console.log('go');
break;
default:(コロン)
console.log('wrong signal');
}