フォールスルーを活用方法を理解する必要がある
コード 19行
switch (Number(lamp)) {
case 1: return;
case 6:
derby_king = "-";
doguti_sp = "-";
aiti_giant = "-";
case 5:
tukemai_kosya = "-";
koiten = "-";
ipan_oni = "-";
case 4:
kanto_gamashi = "-";
teikai_hiroin = "-";
default:
kakedasi = "-";
atozaki = "-";
saikyo_b2 = "-";
}
元のコード 20行
if(Number(lamp) === 1) return;
if((Number(lamp) < 4)){
kakedasi = "-";
atozaki = "-";
saikyo_b2 = "-";
}
if((Number(lamp) < 5)){
kanto_gamashi = "-";
teikai_hiroin = "-";
}
if((Number(lamp) < 6)){
tukemai_kosya = "-";
koiten = "-";
ipan_oni = "-";
}
if((Number(lamp) === 6)){
derby_king = "-";
doguti_sp = "-";
aiti_giant = "-";
}