1. Trang chủ
  2. » Công Nghệ Thông Tin

Javascript the good parts

172 460 0

Đ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

Thông tin cơ bản

Định dạng
Số trang 172
Dung lượng 6,09 MB

Nội dung

Download from Wow! eBook JavaScript: The Good Parts Other resources from O’Reilly Related titles oreilly.com High Performance Web Sites JavaScript and DHTML Cookbook™ JavaScript: The Definitive Guide Learning JavaScript oreilly.com is more than a complete catalog of O’Reilly books You’ll also find links to news, events, articles, weblogs, sample chapters, and code examples oreillynet.com is the essential portal for developers interested in open and emerging technologies, including new platforms, programming languages, and operating systems Conferences O’Reilly brings diverse innovators together to nurture the ideas that spark revolutionary industries We specialize in documenting the latest tools and systems, translating the innovator’s knowledge into useful skills for those in the trenches Visit conferences.oreilly.com for our upcoming events Safari Bookshelf (safari.oreilly.com) is the premier online reference library for programmers and IT professionals Conduct searches across more than 1,000 books Subscribers can zero in on answers to time-critical questions in a matter of seconds Read the books on your Bookshelf from cover to cover or simply flip to the page you need Try it today for free JavaScript: The Good Parts Douglas Crockford Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo JavaScript: The Good Parts by Douglas Crockford Copyright © 2008 Yahoo! Inc All rights reserved Printed in the United States of America Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472 O’Reilly books may be purchased for educational, business, or sales promotional use Online editions are also available for most titles (safari.oreilly.com) For more information, contact our corporate/institutional sales department: (800) 998-9938 or corporate@oreilly.com Editor: Simon St.Laurent Production Editor: Sumita Mukherji Copyeditor: Genevieve d’Entremont Proofreader: Sumita Mukherji Indexer: Julie Hawks Cover Designer: Karen Montgomery Interior Designer: David Futato Illustrator: Robert Romano Printing History: May 2008: First Edition Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc JavaScript: The Good Parts, the image of a Plain Tiger butterfly, and related trade dress are trademarks of O’Reilly Media, Inc Java™ is a trademark of Sun Microsystems, Inc Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks Where those designations appear in this book, and O’Reilly Media, Inc was aware of a trademark claim, the designations have been printed in caps or initial caps While every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein This book uses RepKover™, a durable and flexible lay-flat binding ISBN: 978-0-596-51774-8 [M] 42.5# [11/10] Download from Wow! eBook For the Lads: Clement, Philbert, Seymore, Stern, and, lest we forget, C Twildo Table of Contents Preface xi Good Parts Why JavaScript? Analyzing JavaScript A Simple Testing Ground Grammar Whitespace Names Numbers Strings Statements Expressions Literals Functions 10 15 17 19 Objects 20 Object Literals Retrieval Update Reference Prototype Reflection Enumeration Delete Global Abatement 20 21 22 22 22 23 24 24 25 vii Functions 26 Function Objects Function Literal Invocation Arguments Return Exceptions Augmenting Types Recursion Scope Closure Callbacks Module Cascade Curry Memoization 26 27 27 31 31 32 32 34 36 37 40 40 42 43 44 Inheritance 46 Pseudoclassical Object Specifiers Prototypal Functional Parts 47 50 50 52 55 Arrays 58 Array Literals Length Delete Enumeration Confusion Methods Dimensions 58 59 60 60 61 62 63 Regular Expressions 65 An Example Construction Elements viii | Table of Contents 66 70 72 if (ch === '-' || ch === '+') { string += ch; next(); } while (ch >= '0' && ch

Ngày đăng: 11/05/2017, 13:50

TỪ KHÓA LIÊN QUAN