Abstract
Chapter 4 presents the core programming capabilities of JavaScript. The topics include basic programming terminology and concepts, code structure, data and objects, variables, operators, mathematical and string-manipulation functions, decision-making structures, and constructs for repetitive calculations.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Author’s note: Some of my students complain that the alert box looks too much like a “warning,” rather than an information window. For the examples in this chapter, you can use document.write() instead of alert() if that is your preference.
- 2.
In some cases, the parseInt() method, discussed in Chap. 6, might be the preferred choice if the number is to be treated as an integer.
- 3.
Even JavaScript: The Complete Reference, the book referenced in Chap. 1, makes this mistake.
- 4.
Author’s note: I have seen some online references claiming that some implementations of Math.random() might, in fact, occasionally produce a value exactly equal to 1.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Copyright information
© 2011 Springer-Verlag London Limited
About this chapter
Cite this chapter
Brooks, D.R. (2011). Fundamentals of the JavaScript Language. In: Guide to HTML, JavaScript and PHP. Springer, London. https://doi.org/10.1007/978-0-85729-449-4_4
Download citation
DOI: https://doi.org/10.1007/978-0-85729-449-4_4
Published:
Publisher Name: Springer, London
Print ISBN: 978-0-85729-448-7
Online ISBN: 978-0-85729-449-4
eBook Packages: Computer ScienceComputer Science (R0)