JavaScript Essentials For Dummies 9781394263226, 9781394263219, 9781394263233

The concise and digestible get-started guide to JavaScript programming JavaScript Essentials For Dummies is your quick r

136 22 2MB

English Pages 192 Year 2024

Report DMCA / Copyright

DOWNLOAD EPUB FILE

Table of contents :
Cover
Table of Contents
Title Page
Copyright
Introduction
About This Book
Foolish Assumptions
Icons Used in This Book
Where to Go From Here
Chapter 1: JavaScript: The Big Picture
Adding JavaScript Code to a Web Page
What You Need to Get Started
Dealing with Two Exceptional Cases
Commenting Your Code
Moving to External JavaScript Files
Chapter 2: Programming with Variables
Getting Your Head around Variables
Naming Variables: Rules and Best Practices
Understanding Literal Data Types
Chapter 3: Building Expressions
Understanding How Expressions Are Structured
Creating Numeric Expressions
Building String Expressions
Building Comparison Expressions
Building Logical Expressions
Understanding Operator Precedence
Chapter 4: Controlling the Flow of JavaScript
Decision-Making with if Statements
Branching with if…else Statements
Understanding the Value of Code Looping
Working with while Loops
Working with for Loops
Working with do…while Loops
Chapter 5: Harnessing the Power of Functions
Getting to Know the Function Structure
Making a Function Call
Passing One or More Values to a Function
Getting a Value from a Function
Working with Anonymous Functions
Working with Arrow Functions
Chapter 6: Coding the Document Object Model
Getting Familiar with Objects
Introducing the Document Object Model
Specifying Elements in Your Code
Touring the DOM with Code
Adding, Modifying, and Removing Elements
Using Code to Mess Around with CSS
Using Code to Tweak HTML Attributes
Listening for Page Events
Chapter 7: Working with Arrays
What Is an Array?
Declaring an Array
Populating an Array
Iterating Arrays
Manipulating Arrays
Chapter 8: Coding Strings and Dates
Manipulating Strings
Dealing with Dates and Times
Chapter 9: Debugging JavaScript
Laying Out Your Debugging Tools
Debugging 101: Using the Console
Putting Your Code into Break Mode
Stepping Through Your Code
Chapter 10: Dealing with Form Data
Coding Text Fields
Programming Checkboxes
Coding Radio Buttons
Programming Selection Lists
Working with Form Events
Handling Form Data
Chapter 11: Ten JavaScript Debugging Strategies
Get Thee to Your Dev Tools
The Console Is Your Best Debugging Friend
Give Your Code a Break(point)
Step Through Your Code
Monitor Variable and Object Property Values
Indent Your Code
Break Down Complex Tasks
Break Up Long Statements
Comment Out Problem Statements
Use Comments To Document Your Scripts
Index
About the Author
Advertisement Page
Connect with Dummies
End User License Agreement

JavaScript Essentials For Dummies
 9781394263226, 9781394263219, 9781394263233

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
Recommend Papers