<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之旅 廣告
                [TOC] # 關鍵字in ## 1檢測對象中是否有該屬性、 ***** 語法: "key" in obj **對象中有該屬性返回true,沒有就返回false** key不加雙引號的話,要定義個變量來接收 var a = "name"; console.log(a in obj); ***** ### 1.1不僅能檢測私有屬性,還能檢測公有屬性 ***** 不僅能檢測自己身上的屬性和方法,還能檢測原型上的屬性和方法 ``` function Person(age,name){ //私有屬性 this.name = name; this.age = age; } //原型上面發屬性和方法,都是公有的 Person.prototypr.color = "red"; //原型上的方法 Person.prototypr = { constructor:Person,//有多個方法,使用對象創建,要修改指向 say:function{ console.log("我是公有的方法"); }, play:function{ console.log("我也是公有的方法"); }, } //實例化對像 var per1 = new Person("wc",3); console.log(per1); ``` ## 2**遍歷循環for 迭代 枚舉for** 語法: for(var key in key){ } ![](https://img.kancloud.cn/de/4a/de4a9b21363bad629e00394c765ff44d_866x450.png)
                  <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>

                              哎呀哎呀视频在线观看