我不知道怎麼回事......jquery - 爲什麼if子句觸發儘管條件不滿足?
我有這樣的:
console.log("n="+n):
console.log("longest.length="+longest.length);
console.log("longest.length/n="+longest.length/n);
if (n=1 || longest.length/n != 1) {
// do something
}
控制檯說:N = 4,longest.length = 4和longest.length/N = 1
還是......做點火災......我做錯了什麼?
爲什麼不'longest.length == n'? –