Javascript in easy steps, 6th edition
eBook - ePub

Javascript in easy steps, 6th edition

  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

Javascript in easy steps, 6th edition

About this book

JavaScript in easy steps, 6th edition instructs the user how to create exciting web pages that employ the power of JavaScript to provide functionality. You need have no previous knowledge of any scripting language so it's ideal for the newcomer to JavaScript. By the end of this book you will have gained a sound understanding of JavaScript and be able to add exciting dynamic scripts to your own web pages.

JavaScript in easy steps, 6th edition begins by explaining how to easily incorporate JavaScript code in an HTML document. Examples demonstrate how to use built-in JavaScript functions to work with Math, date and time, random numbers, cookies, text strings, and elements of web pages via the Document Object Model (DOM). You will learn how JavaScript is used with HTML submission forms and how JavaScript Object Notation (JSON) is used for asynchronous browser-server communication. The book examples provide clear syntax-highlighted code showing how to create behaviors for an HTML document to endow components with interactive functionality, to illustrate each aspect of JavaScript.

JavaScript in easy steps, 6th edition has an easy-to-follow style that will appeal to anyone who wants to add functionality to their web pages. It will appeal to programmers who want to quickly add JavaScript to their skills set, and to the student who is studying website design at school or college, and to those seeking a career in web development who need an understanding of client-side scripting.

Fully updated since the previous edition, which was published in 2013.

Table of Contents:

  • Get Started in JavaScript
  • Perform Useful Operations

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access Javascript in easy steps, 6th edition by Mike McGrath in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming in JavaScript. We have over one million books available in our catalogue for you to explore.
1
Get Started in JavaScript
This chapter is an introduction to the exciting world of JavaScript. It demonstrates how to add scripts to HTML documents that provide JavaScript variables and functions.
Meet JS
Include Scripts
Console Output
Make Statements
Avoid Keywords
Store Values
Create Functions
Assign Functions
Recognize Scope
Use Closures
Summary
Meet JS
JavaScript (ā€œJSā€) is an object-based scripting language whose interpreter is embedded inside web browser software such as Google Chrome, Microsoft Edge, Firefox, Opera, and Safari. This allows scripts contained in a web page to be interpreted when the page is loaded in the browser to provide functionality. For security reasons, JavaScript cannot read or write files, with the exception of ā€œcookieā€ files that store minimal data.
image
Created by Brendan Eich at Netscape, JavaScript was first introduced in December 1995, and was initially named ā€œLiveScriptā€. It was soon renamed, however, to perhaps capitalize on the popularity of Sun Microsystem’s Java programming language – although it bears little resemblance.
Before the introduction of JavaScript, web page functionality required the browser to call upon ā€œserver-sideā€ scripts, resident on the web server, where slow response could impede performance. Calling upon ā€œclient-sideā€ scripts resident on the user’s system, overcame the latency problem and provided a superior experience.
JavaScript quickly became very popular but a disagreement arose between Netscape and Microsoft over its licensing – so Microsoft introduced its own version named ā€œJScriptā€. Although similar to JavaScript, the new JScript version had some extended features. Recognizing the danger of fragmentation, the JavaScript language was standardized by the Ecma International standards organization in June 1997 as ā€œECMAScriptā€. This helped to stabilize core features but the name, sounding like some kind of skin disease, is not widely used and most people will always call the language ā€œJavaScriptā€.
image
Brendan Eich, creator of the JavaScript language, also co-founded the Mozilla project and helped launch the Firefox web browser.
The JavaScript examples in this book describe three key ingredients:
•Language basics – illustrating the mechanics of the language syntax, keywords, ope...

Table of contents

  1. Cover
  2. Title
  3. Copyright
  4. Contents
  5. 1 Get Started in JavaScript
  6. 2 Perform Useful Operations
  7. 3 Manage the Script Flow
  8. 4 Use Script Objects
  9. 5 Control Numbers & Strings
  10. 6 Address the Window Object
  11. 7 Interact with the Document
  12. 8 Create Web Applications
  13. 9 Produce Script Magic
  14. Back Cover