0
我有一個困惑,當我學習jQuery的源代碼: 請參見第三排如下:爲什麼context和rootjQuery可以執行'||'操作?並返回結果是不是布爾類型?
// HANDLE: $(expr, $(...))
} else if (!context || context.jquery) {
return (context || rootjQuery).find(selector);
我覺得「rootjQuery」是「$(文件)」,「背景」是一個jQuery對象。
爲什麼context和rootjQuery可以執行'||'操作? 並返回結果不是布爾類型?
謝謝!