JUMP START
JAVASCRIPT
BY ARA PEHLIVANIAN
& DON NGUYEN
Jump Start JavaScript
by Ara Pehlivanian and Don Nguyen
Copyright © 2013 SitePoint Pty. Ltd.
English Editor: Kelly SteeleProduct Manager: Simon Mackie
Cover Designer: Alex WalkerTechnical Editor: Colin J. Ihrig
Notice of Rights
All rights reserved. No part of this book may be reproduced, stored in a retrieval system or transmitted
in any form or by any means, without the prior written permission of the publisher, except in the case
of brief quotations embodied in critical articles or reviews.
Notice of Liability
The author and publisher have made every effort to ensure the accuracy of the information herein.
However, the information contained in this book is sold without warranty, either express or implied.
Neither the authors and SitePoint Pty. Ltd., nor its dealers or distributors will be held liable for any
damages to be caused either directly or indirectly by the instructions contained in this book, or by the
software or hardware products described herein.
Trademark Notice
Rather than indicating every occurrence of a trademarked name as such, this book uses the names only
in an editorial fashion and to the benefit of the trademark owner with no intention of infringement of
the trademark.
Published by SitePoint Pty. Ltd.
48 Cambridge Street Collingwood
VIC Australia 3066
Web: www.sitepoint.com
Email: business@sitepoint.com
ISBN 978-0-9873321-8-9 (print)
ISBN 978-0-9873321-9-6 (ebook)
Printed and bound in the United States of America
ii
About Ara Pehlivanian
Ara Pehlivanian has been working on the web since 1997. Most recently, he's worked on
high-end, highly visible projects as a web developer and practice lead at Nurun, a front-end
engineer at Yahoo! Mail and is currently a JavaScript developer on the HP Cloud Services
team.
About Don Nguyen
Like many programmers, Don dabbled in JavaScript for a number years as a secondary lan-
guage. It wasn't until he began implementing server-side projects in Node.js that JavaScript
began to take center stage. Having been heavily involved in a number of web projects from
the back-end all the way to the front, he is now equally at home with JavaScript on the client
and on the server. He currently spends his time working on building startups from his home
base of Sydney, Australia.
About SitePoint
SitePoint specializes in publishing fun, practical, and easy-to-understand content for web
professionals. Visit http://www.sitepoint.com/ to access our blogs, books, newsletters, articles,
and community forums. You’ll find a stack of information on JavaScript, PHP, Ruby, mobile
development, design, and more.
About Jump Start
Jump Start books provide you with a rapid and practical introduction to web development
languages and technologies. Typically around 150 pages in length, they can be read in a
weekend, giving you a solid grounding in the topic and the confidence to experiment on
your own.
iii
To my loving wife Krista, without
whose grace, patience and support
I would not have been able to
write this; and to our two brilliant
daughters.
—Ara
To Lorraine, thank you for keeping
me nourished with hot food, a
warm heart and a beaming smile.
—Don