Javascript in easy steps, 6th edition
eBook - ePub

Javascript in easy steps, 6th edition

Mike McGrath

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

Javascript in easy steps, 6th edition

Mike McGrath

Book details
Book preview
Table of contents
Citations

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

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
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.
Do you support text-to-speech?
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.
Is Javascript in easy steps, 6th edition an online PDF/ePUB?
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.

Information

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