【发布时间】:2018-06-02 06:38:15
【问题描述】:
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");
}
如果你还不能说,我对 JavaScript 很陌生。使用我的 else if 语句,我似乎无法找到解决此错误的方法。
【问题讨论】:
标签: javascript expression declaration