JavaScript Course Overview
Welcome to the JavaScript Course
This course introduces JavaScript fundamentals through practical exercises. Each chapter covers key concepts and includes exercises to apply your skills. Use the provided Figma designs and GitHub solutions for guidance.
Chapter Breakdown
Chapter 1: JavaScript Basics
In this chapter, you’ll learn essential JavaScript methods for manipulating the DOM, such as using document
to access elements, innerHTML
to modify content, and creating reusable code with functions. You’ll also cover basic data types like strings, numbers, and booleans.
Exercises:
- Use
document.getElementById
to modify an HTML element. - Write a function that accepts parameters and returns a calculated value.
- Practice with different data types by declaring and logging variables.
Chapter 2: Control Structures
Here, you’ll explore control structures, including loops, conditions, and arrays. Learn to create loops with for
, make decisions with if
, and use objects and arrays to store and manipulate collections of data.
Exercises:
- Use a
for
loop to iterate over an array of items. - Write a conditional statement using
if
to check a variable’s value and log a message.
Chapter 3: Interaction Methods
This chapter covers JavaScript interaction methods, such as displaying alerts, using for...in
to iterate over object properties, confirming actions with confirm
, and transforming data with map
.
Exercises:
- Display a prompt and alert the user’s response.
- Use the
map
function to double each number in an array.
Chapter 4: Loops and Selectors
You’ll learn about while
and do...while
loops for repeated execution, assignment operators for variable manipulation, and querySelector
and outerHTML
for targeting and modifying specific elements.
Exercises:
- Use a
while
loop to count down from 10. - Modify the
outerHTML
of an element usingquerySelector
.
Chapter 5: Events and Math
This chapter introduces the event
object for handling user interactions, Math
for performing calculations, RegExp
for pattern matching, and the switch
statement for handling multiple cases.
Exercises:
- Create an event listener that responds to a button click.
- Use
Math.random
to generate a random number. - Write a regular expression to validate email format.
Chapter 6: Browser and Async
Here, you’ll work with browser-specific objects like window
, screen
, and cookies. Additionally, you’ll learn about timing functions and asynchronous JavaScript to handle delayed tasks and user sessions.
Exercises:
- Set a timeout to display a message after 5 seconds.
- Retrieve and display screen properties (width, height) of the user’s device.
Chapter 7: Data Management
This chapter introduces managing data with JavaScript classes
, working with dates, storing data in JSON format, and using localStorage
for persistent data storage in the browser.
Exercises:
- Create a class with a constructor and methods.
- Store an object in
localStorage
and retrieve it to display in the console.
How to Navigate This Course
- Start with Chapter 1 and proceed sequentially through the chapters.
- Refer to the Figma design links for each exercise to understand the layout and requirements.
- Complete each exercise and compare your results with the GitHub solutions.
- Use the solutions to help troubleshoot if needed.
Happy coding with JavaScript! 🚀