`
pstinghua
  • 浏览: 24590 次
  • 性别: Icon_minigender_1
  • 来自: 北京
最近访客 更多访客>>
社区版块
存档分类
最新评论

with

阅读更多
[size=medium]The with statement is used to temporarily modify the scope
chain. It has the following syntax:
with (object)
  statement

This statement effectively adds object to the front of the scope chain, executes statement , and then
restores the scope chain to its original state.

Despite its occasional convenience, use of the with statement is frowned upon. JavaScript code that uses
with is difficult to optimize and may therefore run more slowly than the equivalent code written without
the with statement. Furthermore, function definitions and variable initializations within the body of a with
statement can have surprising and counterintuitive behavior.
  • For these reasons, it is recommended
  • that you avoid the with statement.[/size]
    分享到:
    评论

    相关推荐

      Statistical Computing with R

      Focusing on implementation rather than theory, 'Statistical Computing with R' serves as a valuable tutorial, providing examples that illustrate programming concepts in the context of practical ...

      Debugging With GDB中文版

      with the Invariant Sections being “Free Software” and “Free Software Needs Free Documentation”, with the Front-Cover Texts being “A GNU Manual,” and with the Back-Cover Texts as in (a) below. ...

      debugging_with_gdb(中文版pdf)

      根据提供的信息,我们可以总结并详细解释与“debugging_with_gdb(中文版pdf)”相关的知识点。这份文档似乎是一份关于使用 GDB(GNU Debugger)进行调试的手册或指南的中文版 PDF 文件。GDB 是一个非常强大的开源调试...

      Mobile App Development with Ionic 2

      Mobile App Development with Ionic 2: Cross-Platform Apps with Ionic, Angular, and Cordova by Chris Griffith English | 10 Apr. 2017 | ASIN: B06Y5Q24B2 | 310 Pages | AZW3 | 2.93 MB Learn how to build ...

    Global site tag (gtag.js) - Google Analytics