Skip to main content

Fundamentals of the JavaScript Language

  • Chapter
  • First Online:
Guide to HTML, JavaScript and PHP
  • 5979 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 84.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 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. 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. 3.

    Even JavaScript: The Complete Reference, the book referenced in Chap. 1, makes this mistake.

  4. 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

Authors

Corresponding author

Correspondence to David R. Brooks .

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics