Learning JavaScript tutorial – JavaScript with Statement
JavaScript offer lots of verity whiling dealing with the statements. Along with the flow control and loop control statements JavaScript supports object-related "with statements". With statement allows using a shorthand notation when referring objects and deals with the object scope chain.
with (object)
{
statement(s);
}
Let us consider an example of the document object allows us to access the objects that compose a document. Using JavaScript with Statement we can access the scope of document object.





