<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>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # 1、賦值運算符(Assignment operators) 賦值運算符是一個?“=”。表示將“=”后面的內容賦值給左邊的內容。 # 2、比較運算符(Comparison operators) ![](https://img.kancloud.cn/aa/d1/aad17fc4f493dc437bb2c979f7588219_957x176.png) ![](https://img.kancloud.cn/00/7c/007c1504baee7c7b400a3cfb0f66add9_750x83.png) # 3、算數運算符(Arithmetic operators) 加、減、乘、除、取余 ![](https://img.kancloud.cn/70/d5/70d5d2f46248ecb6a8a4a99b7ab2ca2b_946x404.png) # 4、邏輯運算符(Logical operators) 或者、并且、非 ``` var a = 1, b = 2, c = 0, d = false; var e = a||b; // e = a; ``` ``` //console.log(a||b); // 1 //console.log(a||c); // 1 //console.log(c||a); // 1 //console.log(c||d); // false // || 關系,先看左邊,左邊為true,則直接等于左邊;左邊為false,直接等于右邊 ``` ``` console.log(a&&b); // 2 console.log(a&&c); // 0 console.log(c&&a); // 0 console.log(c&&d); // 0 // && 關系,先看左邊,左邊為true,直接等于右邊;左邊為false,直接等于左邊。 console.log(10||20); // 10 /*var x = 10&&20; console.log(x||30); // 20*/ //console.log(0&&5); // 0 ``` # 5、字符串運算符(String operators) PHP中用 點(.) 連接兩個字符串。 JS中用 加號(+) 連接兩個字符串。 如果使用+的是兩個數字,則表示加法運算;如果使用+的有一方是字符串,則表示字符串連接。 ``` console.log(2+3); // 5,表示加法運算,因為參與運算的兩個值都是數值型 console.log(2+'hello'); // 2hello,表示字符串相連 console.log('hello ' + 'world'); //hello world var x = 35; console.log('hahaha' + x); // hahaha35 ``` # 6、條件(三元)運算符(Conditional operator) 元,表示參與運算的參數個數。三元意思就是參與運算的有三個值。 ``` var a = (b>c) ? x : y; ``` 上述代碼整體意思是給a賦值,值可能是x,也可能是y。關鍵取決于b是否大于c。如果b>c,則將x賦值給a;如果b不大于c,則將y賦值給a。 # 7、一元運算符(Unary operators) ``` var a = 2, b = 3; var c = a++; // var c = a; a = a+1 var d = ++b; // b = b+1; var d=b; console.log(a, b , c, d); // a=3, b=4, c=2, d=4 ``` # 8、其他 - void 它是一個函數或是一個語言結構,返回值總是無效的undefined。經常用它來使得超鏈接變得無效。 ![](https://img.kancloud.cn/30/2e/302e05b66532d0a971f2291e81dc8cf0_572x161.png) - typeof它是一個函數或是一個語言結構。typeof(a)、 typeof a; 用于判斷變量的數據類型。 ``` console.log(typeof(123)); // number console.log(typeof 123); // number console.log(typeof 3.14); // number console.log(typeof 'hello world');// string console.log(typeof true); // boolean ``` - in -- 用于判斷下標是否存在數組中,或判斷對象中是否有哪個成員 - instanceof -- 判斷對象的原型
                  <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>

                              哎呀哎呀视频在线观看