Java Reference
In-Depth Information
Data Types and Variables 
What You Will learn in this Chapter:
Representing data in code
Storing data in memory
Making calculations
Converting data
Wrox.Com Code doWnloads for this Chapter
You can find the wrox.com code downloads for this chapter at http://www.wiley.com/go/
BeginningJavaScript5E on the Download Code tab. You can also view all of the examples
and related files at http://beginningjs.com .
One of the main uses of computers is to process and display information. By processing, we
mean the information is modified, interpreted, or filtered in some way by the computer. For
example, on an online banking website, a customer may request details of all money paid out
from his account in the past month. Here the computer would retrieve the information, filter
out any information not related to payments made in the past month, and then display what's
left in a web page. In some situations, information is processed without being displayed, and
at other times, information is obtained directly without being processed. For example, in
a banking environment, regular payments may be processed and transferred electronically
without any human interaction or display.
In computing, information is referred to as data . Data comes in all sorts of forms, such as
numbers, text, dates, and times, to mention just a few. In this chapter, you look specifically
at how JavaScript handles data such as numbers and text. An understanding of how data is
handled is fundamental to any programming language.
In this chapter you start by looking at the various types of data JavaScript can process. Then
you look at how you can store this data in the computer's memory so you can use it again and
again in the code. Finally, you see how to use JavaScript to manipulate and process the data.
 
Search WWH ::




Custom Search