Skip to Content
Real World XML
book

Real World XML

by Steven Holzner
January 2003
Beginner to intermediate content levelBeginner to intermediate
1200 pages
23h 42m
English
Peachpit Press
Content preview from Real World XML

Working with Data in JavaScript

Using data is basic to nearly any JavaScript program, and JavaScript supports quite a number of different data types: numbers, Boolean values, text strings, and so on. You store data values in variables in JavaScript.

As with other programming languages, variables are simply named locations in memory that you use to store data. You create variables in JavaScript with the var statement, and when a variable has been created, it's ready for you to store and retrieve data in.

Here's an example. In this case, I'm creating a new variable named temperature and storing a value of 72 in it using the = assignment operator. When I use this variable in code, JavaScript replaces it with the value 72, so I can display the temperature ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Inside XML

Inside XML

Steven Holzner
XML Hacks

XML Hacks

Michael Fitzgerald

Publisher Resources

ISBN: 0735712867Purchase book