Description
Book Synopsis Who knew how simple using JavaScript could be?
Make the most of JavaScript--even if you''ve never programmed anything before. JavaScript Absolute Beginner''s Guide is the fastest way to learn JavaScript and use it together with CSS3 and HTML5 to create powerful web and mobile experiences. Learn how to do what you want, the way you want, one incredibly easy step at a time. JavaScript has never been this simple!
Here''s a small sample of what you'll learn:
- Organize your code with variables
- Understand how functions make your code reusable
- Use the popular if/else statement to help make a decision in code
- Learn about switch statements and when to use them
- Work with for, while, and do...while loops
- Learn how to use global and local scope
- Understand what closures are<
Table of Contents
- Introduction
- 1 Hello, World!
- 2 Easily testing your code
- Part I The Basic Stuff
- 3 Values and Variables
- 4 Functions
- 5 Conditional Statements: If, Else, and Switch
- 6 Meet the Loops: For, While, and Do...While!
- 7 Timers
- 8 Variable Scope
- 9 Let and Const
- 10 Closures
- 11 Where Should Your Code Live?
- 12 Commenting Your Code
- Part II It's an Object-Oriented World
- 13 Of Pizza, Types, Primitives, and Objects
- 14 Strings
- 15 When Primitives Behave Like Objects
- 16 Arrays
- 17 Numbers
- 18 A Deeper Look at Objects
- 19 Extending Built-in Objects
- 20 Defining Objects as a Class
- 21 Extending Objects
- 22 Booleans and the Stricter === and !== Operators
- 23 Null and Undefined
- 24 Immediately Invoked Function Expressions
- Part III Working with the DOM
- 25 JS, The Browser, and The DOM
- 26 Finding Elements in the DOM
- 27 Modifying DOM Elements
- 28 Styling Your Content
- 29 Traversing the DOM
- 30 Creating and Removing DOM Elements
- 31 In-Browser Developer Tools
- Part IV Dealing with Events
- 32 Events
- 33 Event Bubbling and Capturing
- 34 Mouse Events
- 35 Keyboard Events
- 36 Page Load Events and Other Stuff
- 37 Handling Events for Multiple Elements
- 38 Promises and Asynchronous Events
- Part V Web Components
- 39 What are web components?
- 40 Building a custom element
- 41 Styling and the Shadow DOM
- 42 Templates and Slots
- Conclusion
- Glossary