11.12.2012 Views

JavaScript 2.0-The Complete Reference, Second ... - freecodingtutorial

JavaScript 2.0-The Complete Reference, Second ... - freecodingtutorial

JavaScript 2.0-The Complete Reference, Second ... - freecodingtutorial

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

An example of the use of escape codes and quoting is found next. (X)HTML automatically<br />

―collapses‖ multiple whitespace characters down to one whitespace. So, for example, including<br />

multiple consecutive tabs in your HTML shows up as only one space character.<br />

In this example, the tag is used to tell the browser that the text is preformatted and<br />

that it should not collapse the whitespaces inside of it. Using allows the tabs in the<br />

example to be displayed correctly in the output. <strong>The</strong> result can be seen in Figure 3-1.<br />

Figure 3-1: Illustrating escape codes and quoting in strings<br />

<br />

<br />

<br />

String Example<br />

<br />

<br />

<br />

<br />

<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!