1 option
JavaScript Essentials for Dummies.
- Format:
- Book
- Author/Creator:
- McFedries, Paul.
- Series:
- --For dummies.
- --For dummies
- Language:
- English
- Subjects (All):
- JavaScript (Computer program language).
- Physical Description:
- 1 online resource (195 pages)
- Edition:
- 1st ed.
- Place of Publication:
- Newark : John Wiley & Sons, Incorporated, 2024.
- Summary:
- JavaScript® Essentials by Paul Essentials is a comprehensive guide for beginners and intermediate developers to understand and utilize JavaScript effectively in web development. The book covers fundamental topics such as adding JavaScript to web pages, managing variables, building expressions, controlling program flow, utilizing functions, and interacting with the Document Object Model (DOM). It also delves into advanced topics like working with arrays, manipulating strings and dates, and debugging JavaScript code. The author's purpose is to provide readers with practical knowledge and strategies for writing efficient JavaScript code, making it suitable for anyone looking to enhance their programming skills. The book is part of the For Dummies series, known for its accessible and engaging writing style. Generated by AI.
- Contents:
- Intro
- Title Page
- Copyright Page
- Table of Contents
- 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
- The <
- script>
- tag
- Where do you put the <
- tag?
- Example #1: Displaying a message to the user
- Example #2: Writing text to the page
- What You Need to Get Started
- Dealing with Two Exceptional Cases
- Handling browsers with JavaScript turned off
- Handling very old browsers
- Commenting Your Code
- Moving to External JavaScript Files
- Chapter 2 Programming with Variables
- Getting Your Head around Variables
- Declaring a variable with let
- Storing a value in a variable
- Checking out another way to declare a variable: const
- Using variables in statements
- Naming Variables: Rules and Best Practices
- Rules for naming variables
- Ideas for good variable names
- Understanding Literal Data Types
- Working with numeric literals
- Exponential notation
- Hexadecimal integer values
- Working with string literals
- Using quotation marks within strings
- Understanding escape sequences
- Working with Boolean literals
- Chapter 3 Building Expressions
- Understanding How Expressions Are Structured
- Creating Numeric Expressions
- Building String Expressions
- Building Comparison Expressions
- Building Logical Expressions
- Understanding Operator Precedence
- The order of precedence
- Controlling the order of 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
- When the browser parses the <
- When the page load is complete
- When an event fires
- Passing One or More Values to a Function
- Passing one value to a function
- Passing two or more values to a function
- Getting a Value from a Function
- Working with Anonymous Functions
- Assigning an anonymous function to a variable
- Replacing a function call with an anonymous function
- Working with Arrow Functions
- Chapter 6 Coding the Document Object Model
- Getting Familiar with Objects
- Working with object properties
- Working with object methods
- Introducing the Document Object Model
- Specifying Elements in Your Code
- Specifying an element by id
- Specifying elements by tag name
- Specifying elements by class name
- Specifying elements by selector
- Working with collections of elements
- Touring the DOM with Code
- Getting the children of a parent element
- Getting all the child nodes
- Getting the first child node
- Getting the last child node
- Getting the parent of a child element
- Getting the siblings of an element
- Getting the previous sibling
- Getting the next sibling
- Adding, Modifying, and Removing Elements
- Adding an element to the page
- Step 1: Creating the element
- Step 2: Adding the new element as a child
- Step 3: Adding text and tags to the new element
- Inserting text or HTML into an element
- Removing an element
- Using Code to Mess Around with CSS
- Changing an element's styles
- Adding a class to an element
- Removing a class
- Toggling a class
- Using Code to Tweak HTML Attributes
- Reading an attribute value
- Setting an attribute value
- Removing an attribute
- Listening for Page Events
- Chapter 7 Working with Arrays
- What Is an Array?
- Declaring an Array
- Populating an Array.
- Declaring and populating an array at the same time
- Populating an array using a loop
- Iterating Arrays
- Iterating an array: forEach()
- Iterating to create a new array: map()
- Iterating an array down to a value: reduce()
- Iterating to locate an element: find()
- Manipulating Arrays
- The length property
- Some useful array methods
- Chapter 8 Coding Strings and Dates
- Manipulating Strings
- Working with string templates
- Determining the length of a string
- Searching for substrings
- Learning the methods that extract substrings
- Dealing with Dates and Times
- Learning the arguments used with the Date object
- Getting to know the Date object
- Specifying the current date and time
- Specifying any date and time
- Getting info about a date
- Setting the date
- Chapter 9 Debugging JavaScript
- Laying Out Your Debugging Tools
- Debugging 101: Using the Console
- Getting the console onscreen
- Printing program data in the Console
- Running code in the Console
- Putting Your Code into Break Mode
- Invoking break mode
- Setting a breakpoint
- Adding a debugger statement
- Getting out of break mode
- Stepping Through Your Code
- Stepping one statement at a time
- Stepping into some code
- Stepping over some code
- Stepping out of some code
- Chapter 10 Dealing with Form Data
- Coding Text Fields
- Referencing by field type
- Getting a text field value
- Setting a text field value
- Programming Checkboxes
- Referencing checkboxes
- Getting the checkbox state
- Setting the checkbox state
- Coding Radio Buttons
- Referencing radio buttons
- Getting a radio button state
- Setting the radio button state
- Programming Selection Lists
- Referencing selection list options
- Getting the selected list option
- Changing the selected option
- Working with Form Events
- Setting the focus.
- Monitoring the focus event
- Monitoring the blur event
- Listening for element changes
- 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
- EULA.
- Notes:
- Description based on publisher supplied metadata and other sources.
- Part of the metadata in this record was created by AI, based on the text of the resource.
- ISBN:
- 1-394-26323-6
- OCLC:
- 1428196811
The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.