Javascript 错误:else if语句中应包含声明或语句 if(shirtWidth>=18和&shirtWidth>29)(shirtLength>29)和(shirtSleeve>8.38);{ 控制台日志; }否则,如果(衣袖长度>=19和衣袖长度==22)(衣袖长度==29)和(衣袖长度>8.13和衣袖长度=21和衣袖长度==23)(衣袖长度==30)和(衣袖长度>8.38和衣袖长度==8.87);{ 控制台日志(“L”); }否则,如果(shirtWidth
更改您的代码,那么您就做错了Javascript 错误:else if语句中应包含声明或语句 if(shirtWidth>=18和&shirtWidth>29)(shirtLength>29)和(shirtSleeve>8.38);{ 控制台日志; }否则,如果(衣袖长度>=19和衣袖长度==22)(衣袖长度==29)和(衣袖长度>8.13和衣袖长度=21和衣袖长度==23)(衣袖长度==30)和(衣袖长度>8.38和衣袖长度==8.87);{ 控制台日志(“L”); }否则,如果(shirtWidth,javascript,expression,declaration,Javascript,Expression,Declaration,更改您的代码,那么您就做错了 if (shirtWidth >= 18 && shirtWidth > 29) (shirtLength >29) && (shirtSleeve > 8.38); { console.log("S"); } else if (shirtWidth >= 19 && shirtWidth == 22) (shirtLength == 29) &&
if (shirtWidth >= 18 && shirtWidth > 29) (shirtLength >29) && (shirtSleeve > 8.38); {
console.log("S");
} else if (shirtWidth >= 19 && shirtWidth == 22) (shirtLength == 29) && (shirtSleeve > 8.13 && shirtSleeve < 8.38); {
console.log("M");
} else if (shirtWidth >= 21 && shirtWidth == 23) (shirtLength === 30) && (shirtSleeve > 8.38 && shirtSleeve == 8.87); {
console.log("L");
} else if (shirtWidth <22 && shirtWidth == 25) (shirtLength === 31) && (shirtSleeve < 8.63 && shirtSleeve == 9.62); {
console.log("XL");
} else if (shirtWidth < 24 && shirtWidth == 29) (shirtLength === 34) && (shirtSleeve < 9.63 && shirtSleeve == 10.12); {
console.log("2XL");
} else if (shirtWidth < 26 && shirtWidth == 23) (shirtLength === 30) && (shirtSleeve < 10.13 && shirtSleeve ==12.00); {
console.log("3XL");
}
if((衬衫长度>=18&&shirtWidth>29)| |(衬衫长度>29&&shirtsweeve>8.38)){
控制台日志;
}否则如果((衬衫长度>=19&&shirtWidth==22)| |(衬衫长度==29&&shirtSleeve>8.13&&shirtSleeve<8.38)){
控制台日志(“M”);
}否则如果((衬衫长度>=21&&shirtWidth==23)| |(衬衫长度==30&&shirtSleeve>8.38&&shirtSleeve==8.87)){
控制台日志(“L”);
}else if((shirtWidth)您在上一个条件中缺少一个else if
if ((shirtWidth >= 18 && shirtWidth > 29) || (shirtLength >29 && shirtSleeve > 8.38) ){
console.log("S");
} else if( (shirtWidth >= 19 && shirtWidth == 22) || (shirtLength == 29 && shirtSleeve > 8.13 && shirtSleeve < 8.38)){
console.log("M");
} else if ((shirtWidth >= 21 && shirtWidth == 23) || (shirtLength === 30 && shirtSleeve > 8.38 && shirtSleeve == 8.87)){
console.log("L");
} else if ((shirtWidth <22 && shirtWidth == 25) || (shirtLength === 31 && shirtSleeve < 8.63 && shirtSleeve == 9.62)) {
console.log("XL");
} else if ((shirtWidth < 24 && shirtWidth == 29) || (shirtLength === 34 && shirtSleeve < 9.63 && shirtSleeve == 10.12)) {
console.log("2XL");
} else if((shirtWidth < 26 && shirtWidth == 23) || (shirtLength === 30 && shirtSleeve < 10.13 && shirtSleeve ==12.00)) {
console.log("3XL");
}