久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<small id='7nn92'></small><noframes id='7nn92'>

    <i id='7nn92'><tr id='7nn92'><dt id='7nn92'><q id='7nn92'><span id='7nn92'><b id='7nn92'><form id='7nn92'><ins id='7nn92'></ins><ul id='7nn92'></ul><sub id='7nn92'></sub></form><legend id='7nn92'></legend><bdo id='7nn92'><pre id='7nn92'><center id='7nn92'></center></pre></bdo></b><th id='7nn92'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='7nn92'><tfoot id='7nn92'></tfoot><dl id='7nn92'><fieldset id='7nn92'></fieldset></dl></div>
    <tfoot id='7nn92'></tfoot>

        <bdo id='7nn92'></bdo><ul id='7nn92'></ul>

      1. <legend id='7nn92'><style id='7nn92'><dir id='7nn92'><q id='7nn92'></q></dir></style></legend>

        JavaScript 格式:大括號(hào)必須與 if/function/etc 關(guān)鍵字在

        JavaScript formatting: must braces be on the same line as the if/function/etc keyword?(JavaScript 格式:大括號(hào)必須與 if/function/etc 關(guān)鍵字在同一行嗎?)

        <small id='wbeQP'></small><noframes id='wbeQP'>

          <legend id='wbeQP'><style id='wbeQP'><dir id='wbeQP'><q id='wbeQP'></q></dir></style></legend>
          <tfoot id='wbeQP'></tfoot>
              <tbody id='wbeQP'></tbody>

              <bdo id='wbeQP'></bdo><ul id='wbeQP'></ul>
              1. <i id='wbeQP'><tr id='wbeQP'><dt id='wbeQP'><q id='wbeQP'><span id='wbeQP'><b id='wbeQP'><form id='wbeQP'><ins id='wbeQP'></ins><ul id='wbeQP'></ul><sub id='wbeQP'></sub></form><legend id='wbeQP'></legend><bdo id='wbeQP'><pre id='wbeQP'><center id='wbeQP'></center></pre></bdo></b><th id='wbeQP'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='wbeQP'><tfoot id='wbeQP'></tfoot><dl id='wbeQP'><fieldset id='wbeQP'></fieldset></dl></div>

                1. 本文介紹了JavaScript 格式:大括號(hào)必須與 if/function/etc 關(guān)鍵字在同一行嗎?的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  限時(shí)送ChatGPT賬號(hào)..

                  可能重復(fù):
                  為什么在javascript中放置花括號(hào)時(shí)結(jié)果會(huì)有所不同代碼

                  我們的公司政策規(guī)定,在 PHP 中,左大括號(hào)應(yīng)該在自己的行中以提高可讀性,以便它們可以與右大括號(hào)對(duì)齊;因此:

                  We have company policies that dictate that in PHP opening curly braces should be on their own lines for readability and so that they can line-up with the closing brace; thus:

                  if (true)
                  {
                      ...
                  }
                  

                  但在 JS 中它們應(yīng)該保持在同一行,以防瀏覽器錯(cuò)誤解釋它出現(xiàn)問題.

                  but in JS they should be kept on the same line, in case there are problems with browsers incorrectly interpretting it.

                  if (true) {
                      ...
                  

                  上述斜體部分是否合理?

                  PS - 我懷疑這里已經(jīng)有人問過這個(gè)問題,但我沒有找到與我的完全匹配的問題.抱歉,如果它在那里,但我沒有找到它.

                  PS - I suspect that this question has been asked on here already, but I've not found a question that exactly matches mine. Apologies if it's there and I didn't find it.

                  推薦答案

                  是的,這在某些極端情況下很重要.

                  Yes, it matters in certain corner cases.

                  問題不在于瀏覽器錯(cuò)誤地解釋它".根據(jù) ECMAScript 規(guī)范,狡猾的行為是正確的.沒有表現(xiàn)出這種行為的 JavaScript 實(shí)現(xiàn)將不符合規(guī)范.

                  And the problem isn't with "browsers incorrectly interpreting it". The dodgy behaviour is correct according to the ECMAScript specifications. A JavaScript implementation that didn't exhibit this behaviour would not be spec-compliant.

                  一個(gè)例子.這個(gè)函數(shù)壞了:

                  An example. This function is broken:

                  function returnAnObject {
                      return
                      {
                          foo: 'test'
                      };
                  }
                  

                  它應(yīng)該返回一個(gè)對(duì)象,但實(shí)際上什么也沒返回.JavaScript 是這樣解釋的:

                  It's supposed to return an object, but actually returns nothing. JavaScript interprets it like so:

                  function returnAnObject {
                      return;
                      {
                          foo: 'test'
                      };
                  }
                  

                  這篇關(guān)于JavaScript 格式:大括號(hào)必須與 if/function/etc 關(guān)鍵字在同一行嗎?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  Browserify, Babel 6, Gulp - Unexpected token on spread operator(Browserify,Babel 6,Gulp - 傳播運(yùn)算符上的意外令牌)
                  Is it possible to pass a flag to Gulp to have it run tasks in different ways?(是否可以將標(biāo)志傳遞給 Gulp 以使其以不同的方式運(yùn)行任務(wù)?)
                  Why do we need to install gulp globally and locally?(為什么我們需要在全局和本地安裝 gulp?)
                  How to run Gulp tasks sequentially one after the other(如何一個(gè)接一個(gè)地依次運(yùn)行 Gulp 任務(wù))
                  Visual Studio 2015 crashes when opening Javascript files(打開 Javascript 文件時(shí) Visual Studio 2015 崩潰)
                  Detect FLASH plugin crashes(檢測(cè) FLASH 插件崩潰)

                  • <bdo id='TtAZr'></bdo><ul id='TtAZr'></ul>

                        <tbody id='TtAZr'></tbody>
                        • <small id='TtAZr'></small><noframes id='TtAZr'>

                        • <i id='TtAZr'><tr id='TtAZr'><dt id='TtAZr'><q id='TtAZr'><span id='TtAZr'><b id='TtAZr'><form id='TtAZr'><ins id='TtAZr'></ins><ul id='TtAZr'></ul><sub id='TtAZr'></sub></form><legend id='TtAZr'></legend><bdo id='TtAZr'><pre id='TtAZr'><center id='TtAZr'></center></pre></bdo></b><th id='TtAZr'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='TtAZr'><tfoot id='TtAZr'></tfoot><dl id='TtAZr'><fieldset id='TtAZr'></fieldset></dl></div>
                            <tfoot id='TtAZr'></tfoot>
                            <legend id='TtAZr'><style id='TtAZr'><dir id='TtAZr'><q id='TtAZr'></q></dir></style></legend>
                            主站蜘蛛池模板: 农村黄性色生活片 | 亚洲欧美一区二区三区在线 | 亚洲成人精品 | 蜜桃一区 | 亚洲精品在线看 | 久久免费精品 | www国产成人免费观看视频,深夜成人网 | www国产成人免费观看视频,深夜成人网 | 九九亚洲精品 | 在线视频亚洲 | 在线只有精品 | 亚洲视频www | 日韩视频免费在线 | 美日韩一区二区 | 欧美日韩亚洲视频 | 国产一级电影在线观看 | 亚洲欧美日韩精品久久亚洲区 | 日日日操 | 成人免费看片 | 免费国产成人av | 欧美精品一区二区三区在线 | 国产日韩一区二区 | 成人国产免费视频 | 欧美freesex黑人又粗又大 | 久久久久久av| 青青草一区 | 婷婷一级片 | 成人av电影在线 | 国产美女高潮 | 亚洲欧美久久 | 国产精品午夜电影 | 色综合99 | 毛片在线免费 | 99re在线播放 | 亚洲精品久久久久久国产精华液 | 天天爽夜夜爽精品视频婷婷 | 在线视频一区二区 | 久久91av | 97avcc| 欧美日韩高清在线一区 | 日本黄色大片免费 |