嗨,在如何处理“ var 破坏性变量”方面需要帮助。我需要在“Y 或 N”中回答。并在 if 中放入第三个条件
<script type="text/javascript">
var examResult;
var attendance;
var disruptive;
examResult=parseInt(prompt("Enter Exam result:",""));
attendance=parseInt(prompt("Enter Attendance:",""));
disruptive=prompt("Disruptive Y/N:","");
if((examResult>=40) && (attendance>=75) &&("disruptive))
{
document.write("You have passed");
}
else
{
document.write("You have failed")
}
</script>