Eloquent javascript, 2nd edition

478 1.3K 4
Eloquent javascript, 2nd edition

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

This is a book about getting computers to do what youwant them to do. Computers are about as common asscrewdrivers today, but they contain a lot more hiddencomplexity and thus are harder to operate and understand.To many, they remain alien, slightly threateningthings.

 JavaScript lies at the heart of almost every modern web application, from social apps to the newest browser-based games. Though simple for beginners to pick up and play with, JavaScript is a exible, complex language that you can use to build full-scale applications. Eloquent JavaScript, 2nd Edition dives deep into the JavaScript language to show you how to write beautiful, effective code. Author Marijn Haverbeke immerses you in example code from the start, while exercises and full- chapter projects give you hands-on experience with writing your own programs. As you build projects such as an articial life simulation, a simple programming language, and a paint program, you’ll learn:  The essential elements of programming, including syntax, control, and data  How to organize and clarify your code with object-oriented and functional programming techniques  How to script the browser and make basic web applications  How to use the DOM effectively to interact with browsers  How to harness Node.js to build servers and utilities This edition is thoroughly revised and modern- ized to reect the current state of Java Script and web browsers, with brand-new material, such as a chapter on code performance in Java Script, and expanded coverage of recursion and closures. All sourcecode is available online in an inter active sandbox, where you can edit the code, run it, and see itsoutput instantly. Isn’t it time you became uent in the language of the Web? About the Author Marijn Haverbeke is an independent developer and author, focused primarily on programming languages and tools for programmers. He spends most of his time working on open source software, such as the CodeMirror editor and the Tern type inference engine. $39.95 ($41.95 CDN) Shelve In: Programming Languages/JavaScript THE FINEST IN GEEK ENTERTAINMENT™ www.nostarch.com “I LIE FLAT.” This book uses a durable binding that won’t snap shut. 5 3 9 9 5 9 781593 275846 ISBN: 978-1-59327-584-6 6 89145 75846 7 SFI-00000 Master the Language of the Web A Modern Introduction to Programming Marijn Haverbeke Eloquent JavaScript Haverbeke 2ND EDITION SECOND EDITION www.it-ebooks.info www.it-ebooks.info ELOQUENT JAVASCRIPT www.it-ebooks.info www.it-ebooks.info PRAISE FOR THE FIRST EDITION OF EloquEnt JavaScript “I became a better architect, author, mentor and developer because of this book. It deserves to share shelf space with Flannagan and Crockford.” —Angus Croll, TwiTTer Developer “This is the book I give out when people ask me how to learn proper JavaScript.” —Chris williAms, orgAnizer of JsConf us “One of the best JavaScript books I’ve read.” —rey BAngo, JQuery TeAm memBer AnD ClienT-weB CommuniTy progrAm mAnAger AT miCrosofT “A really good guide to JavaScript; but even more than that, this book is a great guide to programming.” —Ben nADel, Chief sofTwAre engineer AT epiCenTer ConsulTing “A good book, suitable for those without experience in JavaScript and even those without programming experience.” —niCholAs zAkAs, AuThor of HigH Performance JavaScriPt AnD tHe PrinciPleS of obJect-oriented JavaScriPt “Does a good job of detailing the fundamentals and explaining concepts like the stack and the environment. This attention to detail is what sets the book apart from other JavaScript books.” —DesignorATi “If you’re new to JavaScript, the first thing I’d recommend you do is visit Eloquent JavaScript and check out Marijn Haverbeke’s introduction to the language.” —CneT uk www.it-ebooks.info www.it-ebooks.info ELOQUENT JAVASCRIPT A Modern Introduction to Programming by Marijn Haverbeke San Francisco www.it-ebooks.info EloquEnt JavaScript, 2nd Edition. Copyright © 2015 by Marijn Haverbeke. All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. Printed in USA First printing 18 17 16 15 14 1 2 3 4 5 6 7 8 9 ISBN-10: 1-59327-584-6 ISBN-13: 978-1-59327-584-6 Publisher: William Pollock Production Editor: Serena Yang Cover Illustration: Wasif Hyder Developmental Editor: Jennifer Griffith-Delgado Technical Reviewers: Alex Cash, Angus Croll, and Peter van der Zee Copyeditor: Kim Wimpsett Compositor: Serena Yang Proofreader: James M. Fraleigh The illustrations are contributed by various artists: computer (introduction) and unicycle people (Chapter 21) by Max Xiantu. Sea of bits (Chapter 1) and weresquirrel (Chapter 4) by Margarita Martínez and José Menor. Octopuses (Chapter 2 and 4) by Jim Tierney. Object with on/off switch (Chapter 6) by Dyle MacGregor. Regular expression diagrams in Chapter 9 generated with Regexper by Jeff Avallone. Game concept for Chapter 15 by Thomas Palef. Pixel art in Chapter 16 by Antonio Perdomo Pastor. For information on distribution, translations, or bulk sales, please contact No Starch Press, Inc. directly: No Starch Press, Inc. 245 8th Street, San Francisco, CA 94103 phone: 415.863.9900; info@nostarch.com www.nostarch.com The Library of Congress has catalogued the first edition as follows: Haverbeke, Marijn. Eloquent JavaScript: a modern introduction to programming / by Marijn Haverbeke. p. cm. Includes index. ISBN-13: 978-1-59327-282-1 ISBN-10: 1-59327-282-0 1. JavaScript (Computer program language) I. Title. QA76.73.J39H38 2009 005.13'3 dc22 2010032246 No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc. Other product and company names mentioned herein may be the trademarks of their respective owners. Rather than use a trademark symbol with every occurrence of a trademarked name, we are using the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The information in this book is distributed on an “As Is” basis, without warranty. While every precaution has been taken in the preparation of this work, neither the author nor No Starch Press, Inc. shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in it. www.it-ebooks.info For Lotte and Jan www.it-ebooks.info www.it-ebooks.info [...]... run the example code in the book, and to experiment with it, is to look it up in the online version of the book at http:// eloquentjavascript.net/ There, you can click any code example to edit and run it and to see the output it produces To work on the exercises, go to http://eloquentjavascript.net/code/ , which provides starting code for each coding exercise and allows you to look at the solutions... to give an explanation themselves If I have presented one corner of the square and they cannot come back to me with the other three, I should not go over the points again —Confucius Besides explaining JavaScript, I also will introduce the basic principles of programming Programming, it turns out, is hard The fundamental rules are typically simple and clear But programs built on top of these rules tend... interfaces, which once were the default way in which people interacted with computers, have largely been replaced with graphical interfaces But they are still there, if you know where to look One such language, JavaScript, is built into almost every web browser and is thus available on just about every consumer device This book intends to make you familiar enough with this language to be able to make a computer . Haverbeke Eloquent JavaScript Haverbeke 2ND EDITION SECOND EDITION www.it-ebooks.info www.it-ebooks.info ELOQUENT JAVASCRIPT www.it-ebooks.info www.it-ebooks.info PRAISE FOR THE FIRST EDITION OF EloquEnt. uk www.it-ebooks.info www.it-ebooks.info ELOQUENT JAVASCRIPT A Modern Introduction to Programming by Marijn Haverbeke San Francisco www.it-ebooks.info EloquEnt JavaScript, 2nd Edition. Copyright © 2015 by. is a exible, complex language that you can use to build full-scale applications. Eloquent JavaScript, 2nd Edition dives deep into the JavaScript language to show you how to write beautiful,

Ngày đăng: 27/05/2015, 11:24

Từ khóa liên quan

Mục lục

  • Brief Contents

  • Contents in Detail

  • Introduction

    • On Programming

    • Why Language Matters

    • What Is JavaScript?

    • Code, and What to Do with It

    • Overview of This Book

    • Typographic Conventions

    • Part I: Language

      • Chapter 1: Values, Types, and Operators

        • Values

        • Numbers

          • Arithmetic

          • Special Numbers

          • Strings

          • Unary Operators

          • Boolean Values

            • Comparisons

            • Logical Operators

            • Undefined Values

            • Automatic Type Conversion

              • Short-Circuiting of Logical Operators

              • Summary

              • Chapter 2: Program Structure

                • Expressions and Statements

                • Variables

Tài liệu cùng người dùng

Tài liệu liên quan