- Subjects
- Published
-
[Upper Saddle River, New Jersey] :
Published with the authorization of Microsoft Corporation by Pearson Education, Inc
[2022]
- Language
- English
- Corporate Author
- Main Author
- Corporate Author
- Item Description
- Includes index.
- Physical Description
- xix, 491 pages : color illustrations ; 23 cm
- ISBN
- 9780136870722
- Introduction
- Part 1. The world of JavaScript
- 1. Running JavaScript
- What is JavaScript?
- JavaScript origins
- JavaScript and the web browser
- Our first brush with JavaScript
- Tools
- Getting Git
- Getting Visual Studio Code
- Getting the sample files
- Working on files with Visual Studio Code
- What you have learned
- 2. Hypertext Markup Language (HTML)
- HTML and the World Wide Web
- Fetching web pages
- What is HTML?
- Display symbols
- Lay out text in paragraphs
- Create headings
- Use preformatted text
- Add comments to documents
- Add images to web pages
- The HTML document
- Linking HTML documents
- Making active web pages
- Using a button
- Reading input from a user
- Display text output
- Egg timer
- Adding sound to the egg timer
- Controlling audio playback
- An image display program
- What you have learned
- 3. Cascading Style Sheets (CSS)
- Putting on the style
- Splashing some color
- Work with fonts
- Text alignment
- Make a ticking clock
- Create a ticking clock
- Margins around text
- Creating style classes
- Formatting parts of a document using and
- Cascading styles
- Color highlighting using selectors
- What you have learned
- Part 2. Coding with JavaScript
- 4. Working with data
- Computers as data processors
- Programs as data processors
- JavaScript as a data processor
- Process data with expressions
- Data and information
- Variables in programs
- JavaScript identifiers
- Performing calculations
- Whole numbers and real numbers
- Real numbers and floating-point numbers
- Creating random dice
- Working with text
- JavaScript string delimiters
- Escape sequences in strings
- Working with strings and numbers
- Converting strings into numbers
- Make an adding machine
- Making applications
- Calculating a pizza order
- Converting between Fahrenheit and centigrade
- Adding comments
- Global and local variables
- Global variables
- What you have learned
- 4. Making decisions in programs
- Boolean thinking
- Boolean values in JavaScript
- Boolean expressions
- Logical operators
- The if construction
- Adding an else part
- Use decisions to make an application
- Build the user interface
- Add the code
- Using the switch construction
- What you have learned
- 6. Repeating actions in programs
- App development
- Adding data attributes to HTML elements
- Using an unordered list as a container
- The JavaScript for loop
- Work through collections using for-of
- Building web pages from code
- Deleting elements from a document
- What you have learned
- 7. Creating functions
- What makes a function?
- Give information to functions
- Arguments and parameters
- Multiple parameters in a function
- Using references as function arguments
- Arrays of arguments
- Returning values from function calls
- Add error handling to an application
- Local variables in JavaScript functions
- What you have learned
- 8. Storing data
- Collections of data
- Ice Cream Sales
- Creating an array
- Processing data in an array
- Build a user interface
- Arrays as lookup tables
- Creating fixed with layouts
- What you have learned
- 9. Objects
- Make a tiny contacts app
- Prototype HTML
- Prototype style sheet
- Prototype JavaScript
- Storing contact details
- Finding contacts
- Displaying contacts
- Saving a contact
- Finding a contact
- Use an object to store contact details
- Use an object in the Tiny Contacts program
- Store data in JavaScript local storage
- Use JSON to encode object data
- Use property accessors
- Use a data schema
- Build HTML from a schema
- Build a data object from a schema
- Improving the user interface
- Add "Super Search" to Tiny Contacts
- What you have learned
- Part 3. Useful JavaScript
- 10. Advanced JavaScript
- Manage errors with exceptions
- Catching exceptions
- Class design
- Fashion Shop application
- Object-oriented design
- Store data in a class hierarchy
- Add a method to give an object a behavior
- Overriding methods in subclasses
- Static class members
- Data storage
- Build a user interface
- Exploring the Fashion Shop application
- What you have learned
- 11. Creating applications
- Data analysis
- Fashion Shop stock list
- Fashion Shop data analysis
- Work with array methods
- Read the weather
- Fetch data from a server
- Node.js
- Create a web server with Node.js
- Node package manager
- Deploying a Node.js server
- What you have learned
- 12. Creating games
- Use the HTML Canvas
- Canvas coordinates
- Computer art
- Draw images on a canvas
- Animate images
- Control gameplay
- Window events
- Control object position with a keyboard
- Use keydown and keyup events
- Create game objects
- Game sprites
- The game object
- Starting the game
- Add a cheese sprite
- Add a Cracker sprite
- Add lots of crackers
- Catch the crackers
- Add sound
- Adding scores
- Add a killer tomato
- Create timed sprites
- Complete the game
- Add a start screen
- Start the game running
- What you have learned
- Index