Without the with statement
Monday, April 11th, 2005The with statement is a powerful programming concept that Microsoft added to JScript because it was already in VB and VBScript. It later became part of ECMAScript because one of the major players had it.
The with statement allows you to reference fields in an object without prefixing the field.
var x = 100;
document.body.style.left = x + [...]