About the Author
Robin Nixon is a prolific author on programming and web development (as well as psychology and motivation), with his books having been translated into numerous foreign languagesfrequently topping the US and international computer book charts. He has worked with computers and technology for all his life, and began writing about the subject about 35 years ago.
He has authored hundreds of articles and over two dozen books, and is a popular video and online instructor, with thousands of students taking his courses. Robin is also an accomplished programmer, developer, and entrepreneur, with several successful Internet startups to his name, from which he has learned a wealth of programming hints and tips, which he enjoys passing on in his expanding range of web development books, including the following titles:
CSS & CSS3: 20 Lessons to Successful Web Development (McGraw-Hill Education, 2015)
HTML5: 20 Lessons to Successful Web Development (McGraw-Hill Education, 2015)
PHP: 20 Lessons to Successful Web Development (McGraw-Hill Education, 2015)
Learning PHP, MySQL, JavaScript, CSS & HTML5 (OReilly, 2014)
Web Developers Cookbook (McGraw-Hill Education, 2012)
HTML5 for iOS and Android (McGraw-Hill Education, 2010)
About the Technical Editor
Albert Wiersch has been writing software since the Commodore VIC-20 and Commodore 64 days in the early 1980s. He holds a Bachelor of Science degree in Computer Science Engineering and an MBA from the University of Texas at Arlington. Albert currently develops and sells software that helps web developers, educators, students, businesses, and government agencies check their HTML and CSS documents and their websites for quality problems, including many SEO (search engine optimization), mobility, and accessibility issues, with discounts made available to students. His website is at HTMLValidator.com.
Copyright 2015 by McGraw-Hill Education. All rights reserved. Except as permitted under the United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the publisher, with the exception that the program listings may be entered, stored, and executed in a computer system, but they may not be reproduced for publication.
ISBN: 978-0-07-184157-3
MHID: 0-07-184157-1
The material in this eBook also appears in the print version of this title: ISBN: 978-0-07-184158-0, MHID: 0-07-184158-X.
eBook conversion by codeMantra
Version 1.0
All trademarks are trademarks of their respective owners. Rather than put a trademark symbol after every occurrence of a trademarked name, we use names in an editorial fashion only, and to the benefit of the trademark owner, with no intention of infringement of the trademark. Where such designations appear in this book, they have been printed with initial caps.
McGraw-Hill Education eBooks are available at special quantity discounts to use as premiums and sales promotions or for use in corporate training programs. To contact a representative, please visit the Contact Us page at www.mhprofessional.com.
Information has been obtained by McGraw-Hill Education from sources believed to be reliable. However, because of the possibility of human or mechanical error by our sources, McGraw-Hill Education, or others, McGraw-Hill Education does not guarantee the accuracy, adequacy, or completeness of any information and is not responsible for any errors or omissions or the results obtained from the use of such information.
TERMS OF USE
This is a copyrighted work and McGraw-Hill Education and its licensors reserve all rights in and to the work. Use of this work is subject to these terms. Except as permitted under the Copyright Act of 1976 and the right to store and retrieve one copy of the work, you may not decompile, disassemble, reverse engineer, reproduce, modify, create derivative works based upon, transmit, distribute, disseminate, sell, publish or sublicense the work or any part of it without McGraw-Hill Educations prior consent. You may use the work for your own noncommercial and personal use; any other use of the work is strictly prohibited. Your right to use the work may be terminated if you fail to comply with these terms.
THE WORK IS PROVIDED AS IS. McGRAW-HILL EDUCATION AND ITS LICENSORS MAKE NO GUARANTEES OR WARRANTIES AS TO THE ACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM USING THE WORK, INCLUDING ANY INFORMATION THAT CAN BE ACCESSED THROUGH THE WORK VIA HYPERLINK OR OTHERWISE, AND EXPRESSLY DISCLAIM ANY WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. McGraw-Hill Education and its licensors do not warrant or guarantee that the functions contained in the work will meet your requirements or that its operation will be uninterrupted or error free. Neither McGraw-Hill Education nor its licensors shall be liable to you or anyone else for any inaccuracy, error or omission, regardless of cause, in the work or for any damages resulting therefrom. McGraw-Hill Education has no responsibility for the content of any information accessed through the work. Under no circumstances shall McGraw-Hill Education and/or its licensors be liable for any indirect, incidental, special, punitive, consequential or similar damages that result from the use of or inability to use the work, even if any of them has been advised of the possibility of such damages. This limitation of liability shall apply to any claim or cause whatsoever whether such claim or cause arises in contract, tort or otherwise.
To Julie
Contents at a Glance
Contents
Acknowledgments
Once again I would like to thank the amazing team at McGraw-Hill Education, with whom it is always a real pleasure to work on new book projects. In particular, I would like to thank my Sponsoring Editor Brandi Shailer, Amanda Russell for overseeing the projects development, Editorial Supervisor Patty Mon, Production Supervisor Jean Bodeaux, Copy Editor Manish Tiwari, and Jeff Weeks for the excellent cover design. Thanks also goes again to Albert Wiersch (whom I have had the pleasure of working with on a number of occasions) for his meticulous eye for detail during technical review.
Introduction
Why This Book?
The concept for this book grew out of Robins extremely popular online courses in which thousands of students are enrolled. From their feedback, it became evident that the reason for this popularity was that students love the way the material is broken up into easy-to-digest lessons, each of which can be completed in an hour or less. They also like the no-nonsense, jargon-free, and friendly writing style.
Now, working together, Robin and McGraw-Hill Education have revised, updated, and developed his JavaScript course into this book, which not only will teach you everything you need to learn in 20 lessons (of less than an hour each), but it also includes an average 15-minute detailed video walk-through for each lesson, comprising 5 hours of footage in total.
Watch the videos after reading the lesson to reinforce key concepts, or use the video as a primer to working through each print lesson. Together, the book and videos make learning JavaScript easier than it has ever been, and is the ideal way for you to add JavaScript skills to your web development toolkit.