<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # TypeScript 邏輯運算符 > 原文: [https://howtodoinjava.com/typescript/logical-operators/](https://howtodoinjava.com/typescript/logical-operators/) TypeScript 邏輯運算符類似于您在 JavaScript 邏輯運算符中學習的內容。 這些運算符有助于比較布爾表達式并產生單個布爾值作為結果。 ## 邏輯運算符 邏輯 AND 運算符 – `&&` 如果兩個操作數(或表達式)均為`true`,則結果將為`true`,否則為`false`。 ```java let firstVar = true; let secondVar = false; console.log( firstVar && secondVar ); //false console.log( firstVar && true ); //true console.log( firstVar && 10 ); //10 which is also 'true' console.log( firstVar && '10' ); //'10' which is also 'true' ``` > 閱讀更多:[真值和假值](https://howtodoinjava.com/typescript/truthy-and-falsy/) 邏輯或運算符 – <code>&#124;&#124;</code> 如果兩個操作數(或表達式)中的任何一個為`true`,則結果將為`true`,否則為`false`。 ```java let firstVar = true; let secondVar = false; console.log( firstVar &#124;&#124; secondVar ); //true console.log( firstVar &#124;&#124; true ); //true console.log( firstVar &#124;&#124; 10 ); //true console.log( firstVar &#124;&#124; '10' ); //true ``` 邏輯非運算符 – `!` 它用于反轉其操作數的邏輯狀態。 它將`true`轉換為`false`,反之亦然。 ```java let firstVar = 10; let secondVar = 20; console.log( !true ); //false console.log( !false ); //true console.log( !firstVar ); //false console.log( !null ); //true ``` 將我的問題放在評論部分。 學習愉快!
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看