Skip to content

Repository files navigation

SmitTasks — JavaScript Chapter Tasks

A complete set of hands-on JavaScript task files organized chapter by chapter, covering everything from browser alerts to advanced ES6+ concepts.


📁 Task Files

File Chapters Topic
SmitTaskOfChapter1 Ch 1 Alerts
SmitTaskOfChapter2 Ch 2 Variables for Strings
SmitTaskOfChapter3 Ch 3 Variables for Numbers
SmitTaskOfChapter4 Ch 4 Variable Names — Legal & Illegal
SmitTaskOfChapter5-7 Ch 5–7 Math Expressions
SmitTaskOfChapter8-11 Ch 8–11 Concatenating Strings, Prompts & IF Statements
SmitTaskOfChapter12-13 Ch 12–13 If & Else
SmitTaskOfChapter14-17 Ch 14–17 Arrays
SmitTaskOfChapter18-20 Ch 18–20 For Loops
SmitTaskOfChapter21-25 Ch 21–25 Functions
SmitTaskOfChapter26-34 Ch 26–34 Objects
SmitTaskOfChapter39-42 Ch 39–42 DOM & Events
SmitTaskOfChapter43-48 Ch 43–48 ES6+ Advanced JavaScript

📚 Chapter Breakdown

Chapter 1 — Alerts

  • alert(), confirm(), prompt()
  • Basic browser dialog interactions

Chapter 2 — Variables for Strings

  • Declaring string variables with let and const
  • String assignment and reassignment

Chapter 3 — Variables for Numbers

  • Integer and float variables
  • Numeric operations

Chapter 4 — Variable Names (Legal & Illegal)

  • Naming rules and conventions
  • Reserved keywords to avoid
  • camelCase best practices

Chapters 5–7 — Math Expressions

  • Arithmetic operators: +, -, *, /, %
  • Operator precedence
  • Using the Math object

Chapters 8–11 — Concatenating Strings, Prompts & IF Statements

  • String concatenation with +
  • Template literals with backticks
  • Getting user input via prompt()
  • Introduction to if statements

Chapters 12–13 — If & Else

  • if, else if, else blocks
  • Comparison operators: ==, ===, >, <, >=, <=
  • Logical operators: &&, ||, !

Chapters 14–17 — Arrays

  • Creating and accessing arrays
  • Array methods: push(), pop(), shift(), unshift()
  • array.length
  • Looping through arrays

Chapters 18–20 — For Loops

  • for loop syntax
  • Loop counters and conditions
  • Iterating over arrays with loops
  • while loops

Chapters 21–25 — Functions

  • Defining and calling functions
  • Parameters and arguments
  • Return values
  • Variable scope (local vs global)

Chapters 26–34 — Objects

  • Creating objects with properties and methods
  • Accessing properties with dot notation and bracket notation
  • The this keyword
  • Nested objects

Chapters 39–42 — DOM & Events

  • Selecting elements with getElementById, querySelector
  • Modifying HTML content with innerHTML and textContent
  • Event listeners: addEventListener()
  • Handling click, input, submit events

Chapters 43–48 — ES6+ Advanced JavaScript

  • Arrow functions () => {}
  • Destructuring arrays and objects
  • Spread and rest operators
  • let and const vs var
  • Modules: import / export
  • Template literals (advanced usage)

🗺️ Learning Path

Ch1 (Alerts)
  → Ch2–4 (Variables & Naming)
    → Ch5–7 (Math)
      → Ch8–11 (Strings, Prompts, IF)
        → Ch12–13 (If/Else)
          → Ch14–17 (Arrays)
            → Ch18–20 (For Loops)
              → Ch21–25 (Functions)
                → Ch26–34 (Objects)
                  → Ch39–42 (DOM & Events)
                    → Ch43–48 (ES6+)

🚀 How to Run Tasks

  1. Open the task file in VS Code
  2. Open the browser console (F12 → Console tab)
  3. Or create an index.html and link your .js file:
<!DOCTYPE html>
<html>
  <head><title>JS Task</title></head>
  <body>
    <script src="SmitTaskOfChapter1.js"></script>
  </body>
</html>

🛠️ Prerequisites

  • VS Code or any text editor
  • A modern browser (Chrome / Edge / Firefox)
  • Node.js (optional, for running JS outside the browser)

👤 Author

Smit — JavaScript Learning Journey
Tasks organized as part of structured JS coursework.

About

This repo contains all the Tasks of JS(ES6+) given by SMIT while learning JS(ES5 & ES6+).

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages