if else注意事項 var luna = “”; if ( luna = stupid ){ alert(“true”); } else{ alert(“Luna is genius”); } 這裡的等號只有一個,它會直接把值指定給luna。 要用二個等號去比對。