- JavaScript Cookbook, 3rd Edition by Adam D. Scott, Matthew MacDonald, Shelley Powers
- Preface
- Book Audience
- Book Organization
- Conventions Used in This Book
- Using Code Examples
- OâReilly Online Learning
- How to Contact Us
- Acknowledgments
- JavaScript Cookbook. 3 Ed
- JavaScript Cookbook: Programming the Web, 3rd Edition
JavaScript Cookbook, 3rd Edition by Adam D. Scott, Matthew MacDonald, Shelley Powers
Get full access to JavaScript Cookbook, 3rd Edition and 60K+ other titles, with a free 10-day trial of O’Reilly.
There are also live events, courses curated by job role, and more.
Preface
As I sat down to work on the latest edition of JavaScript Cookbook, I considered the âcookbookâ metaphor carefully. What makes a great food cookbook? Browsing the cookbooks on a shelf in my dining room, I noted that my favorites not only have delicious recipes, but they are also full of opinionated hard-earned advice. A cookbook rarely seeks to teach you every recipe for beef bourguignon; rather it teaches you the technique and recipe that the author has found works best for them, typically with a bit of advice thrown in for good measure. Itâs with this concept in mind that we put together this collection of JavaScript recipes. The advice in this book comes from three seasoned pros, but it is ultimately the culmination of our unique experiences. Any other group of developers would have likely produced a similar, but different book.
JavaScript has developed into an amazing and powerful multipurpose programming language. With this collection in hand you will be able to solve all sorts of problems that you encounter and may even begin to develop recipes of your own.
Book Audience
To encompass the many subjects and topics reflective of JavaScript in use today, we had to start with one premise: this is not a book for someone brand new to programming. There are so many good books and tutorials for those looking to learn to program with JavaScript that we felt comfortable targeting the practicing developer, someone looking to solve specific problems and challenges with JavaScript.
If youâve been playing around with JavaScript for several months, maybe tried your hand with a little Node or web development, you should be comfortable with the book material. Additionally, if youâre a developer who primarily works in another programming language, but find yourself needing to use JavaScript from time to time, this should be a helpful guide. Finally, if youâre a working JavaScript developer who sometimes gets stuck on some of the idiosyncrasies of the language, this should act as a useful resource.
Book Organization
There are two types of readers of this book. The first is someone who reads it cover to cover, picking up tidbits of applicable knowledge along the way. The second is someone who dips their toes in as needed, seeking out the solution to a specific challenge or category of problem that they face. We attempted to organize the book in such a way that it would be useful to both types of readers, organizing it into three sections:
- Part I, The JavaScript Language, covers recipes for JavaScript as a programming language.
- Part II, JavaScript in the Browser, covers JavaScript in its natural habitat: the browser.
- Part III, Node.js, looks at JavaScript specifically through the lens of Node.js.
Each chapter of the book is broken down into several individual ârecipes.â A recipe is composed of several parts:
This defines a common development scenario where JavaScript may be used.
A solution to the problem, with a code sample and minimal description.
An in-depth discussion of the code sample and techniques.
Additionally, a recipe may contain recommendations for further reading in a âSee Alsoâ section, or additional techniques in an âExtraâ section.
Conventions Used in This Book
The following typographical conventions are used in this book:
Italic Indicates new terms, URLs, email addresses, filenames, and file extensions. Bold Indicates UI items such as menu items and buttons to be selected or clicked. Constant width Indicates computer code in a broad sense, including commands, arrays, elements, statements, options, switches, variables, attributes, keys, functions, types, classes, namespaces, methods, modules, properties, parameters, values, objects, events, event handlers, XML tags, HTML tags, macros, the contents of files, and the output from commands. Constant width bold Shows commands or other text that should be typed literally by the user. Constant width italic hows text that should be replaced with user-supplied values or by values determined by context.
Note
This element signifies a general note.
Tip
This element signifies a tip or suggestion.
Warning
This element indicates a warning or caution.
Websites and pages are mentioned in this book to help you locate online information that might be useful. Normally both the address (URL) and the name (or title, or appropriate heading) of a page are mentioned. Some addresses are relatively complicated. You may locate such pages more easily using your favorite search engine to search for a page by its name. This may also help if the page cannot be found by its address; the URL may have changed, but the name may still work.
Using Code Examples
Supplemental material (code examples, exercises, etc.) is available for download at https://github.com/javascripteverywhere/cookbook.
This book is here to help you get your job done. In general, if example code is offered with this book, you may use it in your programs and documentation. You do not need to contact us for permission unless youâre reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing examples from OâReilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your productâs documentation does require permission .
We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: JavaScript Cookbook, Third Edition, by Adam D. Scott, Matthew MacDonald, and Shelley Powers. Copyright 2021 Adam D. Scott and Matthew MacDonald, 978-1-492-05575-4.
If you feel your use of code examples falls outside fair use or the permission given here, feel free to contact us at permissions@oreilly.com.
OâReilly Online Learning
Note
For more than 40 years, OâReilly Media has provided technology and business training, knowledge, and insight to help companies succeed.
Our unique network of experts and innovators share their knowledge and expertise through books, articles, and our online learning platform. OâReillyâs online learning platform gives you on-demand access to live training courses, in-depth learning paths, interactive coding environments, and a vast collection of text and video from OâReilly and 200+ other publishers. For more information, visit http://oreilly.com.
How to Contact Us
Please address comments and questions concerning this book to the publisher:
- OâReilly Media, Inc.
- 1005 Gravenstein Highway North
- Sebastopol, CA 95472
- 800-998-9938 (in the United States or Canada)
- 707-829-0515 (international or local)
- 707-829-0104 (fax)
We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at https://oreil.ly/js-cookbook-3e.
Email bookquestions@oreilly.com to comment or ask technical questions about this book.
For news and information about our books and courses, visit http://oreilly.com.
Acknowledgments
This is the third edition of the JavaScript Cookbook. The first two editions were written by Shelley Powers. This edition was written and updated by Adam Scott and Matthew MacDonald. Adam and Matthew would like to thank their editors, Angela Rufino and Jennifer Pollock, who shepherded the project through all its growing pains; and their top-shelf tech reviewers, Sarah Wachs, Schalk Neethling, and Elisabeth Robson, who offered many sharp insights and helpful suggestions. Adam would also like to thank John Paxton for his support and conversation during the early drafts of this edition.
Shelley thanks her editors, Simon St. Laurent and Brian McDonald, and her tech reviewers, Dr. Axel Rauschmayer and Semmy Purewal.
Collectively we all thank the OâReilly production staff for their ongoing help and support .
Get JavaScript Cookbook, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.
JavaScript Cookbook. 3 Ed
Why reinvent the wheel every time you run into a problem with JavaScript? This cookbook is chock-full of code recipes for common programming tasks, along with techniques for building apps that work in any browser. You’ll get adaptable code samples that you can add to almost any project—and you’ll learn more about JavaScript in the process.
The recipes in this book take advantage of the latest features in ECMAScript 2020 and beyond and use modern JavaScript coding standards. You’ll learn how to:
- Set up a productive development environment with a code editor, linter, and test server
- Work with JavaScript data types, such as strings, arrays, and BigInts
- Improve your understanding of JavaScript functions, including arrow functions, closures, and generators
- Apply object-oriented programming concepts like classes and inheritance
- Work with rich media in JavaScript, including audio, video, and SVGs
- Manipulate HTML markup and CSS styles
- Use JavaScript anywhere with Node.js
- Access and manipulate remote data with REST, GraphQL, and Fetch
- Get started with the popular Express application-building framework
- Perform asynchronous operations with Promises, async/await, and web workers
Исходный код: Перейти
Если вам понравилась эта книга поделитесь ею с друзьями, тем самым вы помогаете нам развиваться и добавлять всё больше интересных и нужным вам книг!
JavaScript Cookbook: Programming the Web, 3rd Edition
Why reinvent the wheel every time you run into a problem with JavaScript? This cookbook is chock-full of code recipes for common programming tasks, along with techniques for building apps that work in any browser. You’ll get adaptable code samples that you can add to almost any project–and you’ll learn more about JavaScript in the process.
The recipes in this book take advantage of the latest features in ECMAScript 2020 and beyond and use modern JavaScript coding standards. You’ll learn how to:
- Set up a productive development environment with a code editor, linter, and test server
- Work with JavaScript data types, such as strings, arrays, and BigInts
- Improve your understanding of JavaScript functions, including arrow functions, closures, and generators
- Apply object-oriented programming concepts like classes and inheritance
- Work with rich media in JavaScript, including audio, video, and SVGs
- Manipulate HTML markup and CSS styles
- Use JavaScript anywhere with Node.js
- Access and manipulate remote data with REST, GraphQL, and Fetch
- Get started with the popular Express application-building framework
- Perform asynchronous operations with Promises, async/await, and web workers
Resolve the captcha to access the links!