Coding with JavaScript For Dummies

Book description

Go from beginner to builder quickly with this hands-on JavaScript guide

Coding with JavaScript For Dummies provides easy, hands-on instruction for anyone looking to learn this popular client-side language. No experience? No problem! This friendly guide starts from the very beginning and walks you through the basics, then shows you how to apply what you've learned to real projects. You'll start building right away, including web page elements and simple applications, so you can immediately see how JavaScript is used in the real world. Online exercises allow you to test your code and expand your skills, and the easy-to-follow instruction provides step-by-step guidance toward understanding the JavaScript syntax, applications, and language.

JavaScript enhances static web pages by providing dynamic elements that can adapt and react to user action. It's a need-to-know tool for aspiring web designers, but anyone can benefit from understanding this core development language. Coding with JavaScript For Dummies takes you from beginner to builder quickly as you:

  • Learn what JavaScript does, how it works, and where to use it
  • Master the core elements of JavaScript and immediately put it to work
  • Build interactive web elements and try out your code online
  • Create basic applications as you apply JavaScript to the app development workflow

Anytime a website responds to your movement around the screen, that's JavaScript. It makes websites more functional, more beautiful, and more engaging, and your site visitors will demand nothing less. If you want to build a better website, you need JavaScript. If you need JavaScript, Coding with JavaScript For Dummies gets you started off quickly and painlessly, with plenty of hands-on practice.

Table of contents

    1. Cover
    2. Introduction
      1. About This Book
      2. Foolish Assumptions
      3. Icons Used In This Book
      4. Beyond the Book
      5. Where to Go from Here
    3. Part I: Getting Started with JavaScript
      1. Chapter 1: The World's Most Misunderstood Programming Language
        1. What Is JavaScript?
        2. What Does JavaScript Do?
        3. Why JavaScript?
      2. Chapter 2: Writing Your First JavaScript Program
        1. Setting Up Your Development Environment
        2. Reading JavaScript Code
        3. Running JavaScript in the Browser Window
        4. Using the JavaScript Developer Console
      3. Chapter 3: Working with Variables
        1. Understanding Variables
        2. Declaring Variables
        3. Understanding Global and Local Scope
        4. Naming Variables
        5. Creating Constants Using the const Keyword
        6. Working with Data Types
      4. Chapter 4: Understanding Arrays
        1. Making a List
        2. Array Fundamentals
        3. Creating Arrays
        4. Populating Arrays
        5. Understanding Multidimensional Arrays
        6. Accessing Array Elements
      5. Chapter 5: Working with Operators, Expressions, and Statements
        1. Express Yourself
        2. Hello, Operator
        3. Types of Operators
      6. Chapter 6: Getting into the Flow with Loops and Branches
        1. Branching Out
        2. Here We Go: Loop De Loop
    4. Part II: Organizing Your JavaScript
      1. Chapter 7: Getting Functional
        1. Understanding the Function of Functions
        2. Using Function Terminology
        3. The Benefits of Using Functions
        4. Writing Functions
        5. Returning Values
        6. Passing and Using Arguments
        7. Function Scope
        8. Anonymous Function
        9. Do it Again with Recursion
        10. Functions within Functions
      2. Chapter 8: Making and Using Objects
        1. Object of My Desire
        2. Creating Objects
        3. Retrieving and Setting Object Properties
        4. Deleting Properties
        5. Working with Methods
        6. An Object-Oriented Way to Become Wealthy: Inheritance
    5. Part III: JavaScript on the Web
      1. Chapter 9: Controlling the Browser with the Window Object
        1. Understanding the Browser Environment
      2. Chapter 10: Manipulating Documents with the DOM
        1. Understanding the DOM
        2. Node Relationships
        3. Using the Document Object's Properties and Methods
        4. Using the Element Object’s Properties and Methods
        5. Working with the Contents of Elements
        6. Getting Elements by ID, Tag Name, or Class
        7. Using the Attribute Object’s Properties
      3. Chapter 11: Using Events in JavaScript
        1. Knowing Your Events
        2. Handling Events
      4. Chapter 12: Integrating Input and Output
        1. Understanding HTML Forms
        2. Working with the Form Object
      5. Chapter 13: Working with CSS and Graphics
        1. Using the Style Object
        2. Animating Elements with the Style Object
        3. Working with Images
        4. Using the Style Object’s Animation Properties
    6. Part IV: Beyond the Basics
      1. Chapter 14: Searching with Regular Expressions
        1. Finding It Out with Regular Expressions
        2. Writing Regular Expressions
        3. Using Modifiers
        4. Coding with Regular Expressions
      2. Chapter 15: Understanding Callbacks and Closures
        1. What Are Callbacks?
        2. Understanding Closures
        3. Using Closures
      3. Chapter 16: Embracing AJAX and JSON
        1. Working Behind the Scenes with AJAX
        2. Putting Objects in Motion with JSON
    7. Part V: JavaScript and HTML5
      1. Chapter 17: HTML5 APIs
        1. Understanding How APIs Work
        2. Using Geolocation
        3. Accessing Audio and Video
      2. Chapter 18: jQuery
        1. Writing More and Doing Less
        2. Getting Started with jQuery
        3. The jQuery Object
        4. Is Your Document Ready?
        5. Using jQuery Selectors
        6. Changing Things with jQuery
        7. Events
        8. Effects
        9. AJAX
    8. Part VI: The Part of Tens
      1. Chapter 19: Ten JavaScript Frameworks and Libraries to Learn Next
        1. Angular JS
        2. Backbone.js
        3. Ember.js
        4. Famo.us
        5. Knockout
        6. QUnit
        7. underscore.js
        8. Modernizr
        9. Handlebars.js
        10. jQuery
      2. Chapter 20: Ten Common JavaScript Bugs and How to Avoid Them
        1. Equality Confusion
        2. Mismatched Brackets
        3. Mismatched Quotes
        4. Missing Parentheses
        5. Missing Semicolon
        6. Capitalization Errors
        7. Referencing Code Before It’s Loaded
        8. Bad Variable Names
        9. Scope Errors
        10. Missing Parameters in Function Calls
        11. Counting Errors: Forgetting That JavaScript Counts from 0
      3. Chapter 21: Ten Online Tools to Help You Write Better JavaScript
        1. JSLint
        2. JSFiddle.net
        3. JSBin
        4. javascriptcompressor.com
        5. jsbeautifier.org
        6. JavaScript RegEx generator
        7. JSONformatter
        8. jshint.com
        9. Mozilla Developer Network
        10. Douglas Crockford
    9. About the Authors
    10. Cheat Sheet
    11. Connect with Dummies
    12. End User License Agreement

Product information

  • Title: Coding with JavaScript For Dummies
  • Author(s): Chris Minnick, Eva Holland
  • Release date: May 2015
  • Publisher(s): For Dummies
  • ISBN: 9781119056072