£0
- Brand: Packt Publishing
- Sku: SK69652UK
- Availability: In Stock
✔️Immediate download
✔️Highlighting, editing, saving and printing are available
✔️The same content as in a hardcover book
✔️Search for words within the text
✔️For any PDF file viewers and devices
How to download
Register on this website and pay for your selected book.
After you have paid, go to "My Account"-"Downloads" section. There you will see a PDF file. Download and open it. It contains a link to download your book. Click on the link and download your book.
You can send us a message that you want to receive the book to your e-mail, and a link to download the book will also be sent to your e-mail.
About the book:
Publisher: Packt Publishing
Author (s): , Ray Tricker, Samantha Alford
Pages: 702
Edition: 2021
Language: English
Size: 5 Mb
Content:
Preface
Who this book is for
What this book covers
To get the most out of this book
Get in touch
1. Getting Started with JavaScript
Why should you learn JavaScript?
Setting up your environment
Integrated Development Environment
Web browser
Extra tools
Online editor
How does the browser understand JavaScript?
Using the browser console
Practice exercise 1.1
Adding JavaScript to a web page
Directly in HTML
Practice exercise 1.2
Linking an external file to our web page
Practice exercise 1.3
Writing JavaScript code
Formatting code
Indentations and whitespace
Semicolons
Code comments
Practice exercise 1.4
Prompt
Random numbers
Chapter project
Creating an HTML file and a linked JavaScript file
Self-check quiz
Summary
2. JavaScript Essentials
Variables
Declaring variables let, var, and const
Naming variables
Primitive data types
String
Escape characters
Number
BigInt
Boolean
Symbol
Undefined null
Analyzing and modifying data types
Working out the type of a variable
Converting data types
Practice exercise 2.1
Operators
Arithmetic operators
Addition
Subtraction
Multiplication
Division
Exponentiation
Modulus
Unary operators: increment and decrement
Combining the operators
Practice exercise 2.3
Assignment operators
Practice exercise 2.4
Comparison operators
Equal
Not equal
Greater than and smaller than
Logical operators
And
Or
Not
Chapter project
Miles-to-kilometers converter
BMI calculator
Self-check quiz
Summary
3. JavaScript Multiple Values
Arrays and their properties
Creating arrays
Accessing elements
Overwriting elements
Built-in length property
Practice exercise 3.1
Array methods
Adding and replacing elements
Deleting elements
Finding elements
Sorting
Reversing
Practice exercise 3.2
Multidimensional arrays
Practice exercise 3.3
Objects in JavaScript
Updating objects
Practice exercise 3.4
Working with objects and arrays
Objects in objects
Arrays in objects
Objects in arrays
Objects in arrays in objects
Practice exercise 3.5
Chapter projects
Manipulating an array
Company product catalog
Self-check quiz
Summary
4. Logic Statements
if and if else statements
Practice exercise 4.1
Practice exercise 4.2
Conditional ternary operators
Practice exercise 4.3
switch statements
The default case
Practice exercise 4.4
Combining cases
Practice exercise 4.5
Chapter projects
Evaluating a number game
Friend checker game
Rock Paper Scissors game
Self-check quiz
Summary
5. Loops
while loops
Practice exercise 5.1
do while loops
Practice exercise 5.2
for loops
Practice exercise 5.3
Nested loops
Practice exercise 5.4
Loops and arrays
Practice exercise 5.5
for of loop
Practice exercise 5.6
Loops and objects
for in loop
Practice exercise 5.7
Looping over objects by converting to an array
break and continue
break
continue
Practice exercise 5.8
break, continue, and nested loops
break and continue and labeled blocks
Chapter project
Math multiplication table
Self-check quiz
Summary
6. Functions
Basic functions
Invoking functions
Writing functions
Naming functions
Practice exercise 6.1
Practice exercise 6.2
Parameters and arguments
Practice exercise 6.3
Default or unsuitable parameters
Special functions and operators
Arrow functions
Spread operator
Rest parameter
Returning function values
Practice exercise 6.4
Returning with arrow functions
Variable scope in functions
Local variables in functions
let versus var variables
const scope
Global variables
Immediately invoked function expression
Practice exercise 6.5
Recursive functions
Practice exercise 6.6
Nested functions
Practice exercise 6.7
Anonymous functions
Practice exercise 6.8
Function callbacks
Chapter projects
Create a recursive function
Set timeout order
Self-check quiz
Summary
7. Classes
Object-oriented programming
Classes and objects
Classes
Constructors
Practice exercise 7.1
Methods
Practice exercise 7.2
Properties
Getters and setters
Inheritance
Prototypes
Practice exercise 7.3
Chapter projects
Employee tracking app
Menu items price calculator
Self-check quiz
Summary
8. Built-In JavaScript Methods
Introduction to built-in JavaScript methods
Global methods
Decoding and encoding URIs
decodeUri() and encodeUri()
decodeUriComponent() and
encodeUriComponent()
Encoding with escape() and unescape()
Practice exercise 8.1
Parsing numbers
Making integers with parseInt()
Making floats with parseFloat()
Executing JavaScript with eval()
Array methods
Performing a certain action for every item
Array methods
Performing a certain action for every item
Filtering an array
Checking a condition for all elements
Replacing part of an array with another part of the
array
Mapping the values of an array
Finding the last occurrence in an array
Practice exercise 8.2
Practice exercise 8.3
String methods
Combining strings
Converting a string to an array
Converting an array to a string
Working with index and positions
Creating substrings
Replacing parts of the string
Uppercase and lowercase
The start and end of a string
Practice exercise 8.4
Practice exercise 8.5
Number methods
Checking if something is (not) a number
Checking if something is finite
Checking if something is an integer
Specifying a number of decimals
Specifying precision
Math methods
Finding the highest and lowest number
Square root and raising to the power of
Turning decimals into integers
Exponent and logarithm
Practice exercise 8.6
Date methods
Creating dates
Methods to get and set the elements of a date
Parsing dates
Converting a date to a string
Practice exercise 8.7
Chapter projects
Word scrambler
Countdown timer
Self-check quiz
Summary
9. The Document Object Model
HTML crash course
HTML elements
HTML attributes
The BOM
Practice exercise 9.1
Window history object
Window navigator object
Window location object
Practice exercise 9.2
The DOM
Additional DOM properties
Selecting page elements
Practice exercise 9.3
Chapter project
Manipulating HTML elements with JavaScript
Self-check quiz
Summary
10. Dynamic Element Manipulation Using the DOM
Basic DOM traversing
Practice exercise 10.1
Selecting elements as objects
Changing innerText
Changing innerHTML
Accessing elements in the DOM
Accessing elements by ID
Practice exercise 10.2
Accessing elements by tag name
Practice exercise 10.3
Accessing elements by class name
Practice exercise 10.4
Accessing elements with a CSS selector
Using querySelector()
Using querySelectorAll()
Element click handler
This and the DOM
Practice exercise 10.7
Manipulating element style
Changing the classes of an element
Adding classes to elements
Removing classes from elements
Toggling classes
Manipulating attributes
Practice exercise 10.8
Event listeners on elements
Practice exercise 10.9
Creating new elements
Practice exercise 10.10
Chapter projects
Collapsible accordion component
Interactive voting system
Hangman game
Self-check quiz
Summary
11. Interactive Content and Event Listeners
Introducing interactive content
Specifying events
Specifying events with HTML
Specifying events with JavaScript
Practice exercise 11.1
Specifying events with event listeners
Practice exercise 11.2
The onload event handler
Practice exercise 11.3
Mouse event handlers
Practice exercise 11.4
The event target property
Practice exercise 11.5
DOM event flow
Practice exercise 11.6
onchange and onblur
Practice exercise 11.7
Key event handler
Practice exercise 11.8
Drag and drop elements
Practice exercise 11.9
Form submission
Practice exercise 11.10
Animating elements
Practice exercise 11.11
Chapter projects
Build your own analytics
Star rating system
Mouse position tracker
Box clicker speed test game
Self-check quiz
Summary
12. Intermediate JavaScript
Regular expressions
Specifying multiple options for words
Character options
Groups
Practical regex
Searching and replacing strings
Email validation
Functions and the arguments object
Practice exercise 12.3
JavaScript hoisting
Using strict mode
Debugging
Breakpoints
Practice exercise 12.4
Error handling
Practice exercise 12.5
Using cookies
Practice exercise 12.6
Local storage
Practice exercise 12.7
JSON
Practice exercise 12.8
Parsing JSON
Practice exercise 12.9
Practice exercise 12.9 answers
Chapter projects
Email extractor
Form validator
Simple math quiz
Self-check quiz
Summary
13. Concurrency
Introducing concurrency
Callbacks
Practice exercise 13.1
Promises
Practice exercise 13.2
async and await
Practice exercise 13.3
Event loop
Call stack and callback queue
Chapter project
Password checker
Self-check quiz
Summary
14. HTML5, Canvas, and JavaScript
Introducing HTML5 with JavaScript
Local file reader
Uploading files
Reading files
Practice exercise 14.1
Getting position data with GeoLocation
HTML5 canvas
Practice exercise 14.2
Dynamic canvas
Adding lines and circles to the canvas
Practice exercise 14.3
Adding text to the canvas
Practice exercise 14.4
Adding and uploading images to the canvas
Practice exercise 14.5
Adding animations to the canvas
Practice exercise 14.6
Drawing on canvas with a mouse
Practice exercise 14.7
Saving dynamic images
Media on the page
Digital accessibility in HTML
Chapter projects
Create a Matrix effect
Countdown clock
Online paint app
Self-check quiz
Summary
15. Next Steps
Libraries and frameworks
Libraries
jQuery
D3
Underscore
React
Frameworks
Vue.js
Angular
Learning the backend
APIs
AJAX
Practice exercise 15.1
Node.js
Using the Express Node.js framework
Next steps
Chapter projects
Working with JSON
List-making project
Self-check quiz
Summary
16. Appendix – Practice Exercise, Project, and Self-Check Quiz
Answers
Chapter 1, Getting Started with JavaScript
Practice exercises
Projects
Creating an HTML file and a linked JavaScript file
Self-check quiz
Chapter 2, JavaScript Essentials
Practice exercises
Projects
Miles-to-kilometers converter
BMI calculator
Self-check quiz
Chapter 3, JavaScript Multiple Values
Practice exercises
Projects
Manipulating an array
Company product catalog
Self-check quiz
Chapter 4, Logic Statements
Practice exercises
Projects
Evaluating a number game answers
Friend checker game answers
Rock paper scissors game answers
Self-check quiz
Chapter 5, Loops
Practice exercises
Project
Math multiplication table
Self-check quiz
Chapter 6, Functions
Practice exercises
Projects
Create a recursive function
Set timeout order
Self-check quiz
Chapter 7, Classes
Practice exercises
Projects
Employee tracking app
Menu items price calculator
Self-check quiz
Chapter 8, Built-In JavaScript Methods
Practice exercises
Projects
Word scrambler
Countdown timer
Self-check quiz
Chapter 9, The Document Object Model
Practice exercises
Projects
Manipulating HTML elements with JavaScript
Self-check quiz
Chapter 10, Dynamic Element Manipulation Using the DOM
Practice exercises
Projects
Collapsible accordion component
Interactive voting system
Hangman game
Self-check quiz
Chapter 11, Interactive Content and Event Listeners
Practice exercises
Projects
Build your own analytics
Star rater system
Mouse position tracker
Box clicker speed test game
Self-check quiz
Chapter 12, Intermediate JavaScript
Practice exercises
Projects
Email extractor
Form validator
Simple math quiz
Self-check quiz
Chapter 13, Concurrency
Practice exercises
Projects
Password checker
Self-check quiz
Chapter 14, HTML5, Canvas, and JavaScript
Practice exercises
Projects
Create a Matrix effect
Countdown clock
Online paint app
Self-check quiz
Chapter 15, Next Steps
Practice exercises
Projects
Working with JSON
List-making project
Self-check quiz
Other Books You May Enjoy
Index
There are no reviews for this product.