Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 16. Scope > Expanding the Scope Chain via the with Statement

16.8. Expanding the Scope Chain via the with Statement

The with statement provides a shorthand way to refer to the variables and methods of an object without having to specify the object's name repeatedly. A with statement takes the general form:

with (object) {
  substatements
}


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint