Skip to content

Latest commit

 

History

History
170 lines (137 loc) · 4.72 KB

File metadata and controls

170 lines (137 loc) · 4.72 KB

JavaScript Fundamentals Course - Demo

This file demonstrates how the JavaScript learning and testing system works.

System Overview

Complete JavaScript Learning Platform

  • 3 comprehensive exercises covering core fundamentals
  • Automated testing with detailed feedback
  • Progressive difficulty from beginner to intermediate
  • Professional development workflow

What's Included

📁 Project Structure

javascript-fundamentals-course/
├── package.json                 # Project configuration
├── README.md                   # Main course documentation
├── setup-instructions.md       # Detailed setup guide
├── DEMO.md                     # This demonstration file
├── tests/
│   └── test-runner.js          # Centralized test runner
└── exercises/
    ├── 01-variables/           # Variables and data types
    │   ├── README.md           # Exercise instructions
    │   ├── exercise.js         # Student template
    │   ├── test.js             # Automated tests
    │   └── solution.js         # Complete solution
    ├── 02-functions/           # Functions and scope
    │   ├── README.md
    │   ├── exercise.js
    │   ├── test.js
    │   └── solution.js
    └── 05-arrays/              # Array manipulation
        ├── README.md
        ├── exercise.js
        ├── test.js
        └── solution.js

🎯 Learning Objectives Covered

Exercise 1: Variables and Data Types

  • Variable declarations (let, const, var)
  • Data types (string, number, boolean, object)
  • Basic operations and string manipulation

Exercise 2: Functions

  • Function declarations and expressions
  • Arrow functions and syntax variations
  • Parameters, default values, and return statements
  • Closures and higher-order functions
  • Callback functions

Exercise 5: Arrays

  • Array creation and manipulation
  • Array methods (push, pop, filter, map, reduce)
  • Finding elements and calculating values
  • Immutable operations

How It Works

For Students

  1. Start an Exercise

    cd exercises/01-variables
    # Read README.md for instructions
    # Edit exercise.js to complete functions
  2. Test Your Work

    node test.js
  3. See Results

    • ✅ Green = Success, move to next exercise
    • ❌ Red = Fix errors and try again

For Instructors

  1. Run All Tests

    npm test
  2. Check Individual Exercise

    npm run test:exercise 01-variables
  3. Review Solutions

    • Each exercise has a complete solution.js file
    • Multiple approaches shown for teaching

Sample Test Output

Before Completion (Expected)

Testing Exercise 1: Variables and Data Types
==================================================
❌ Task 1: createPersonInfo()
   Error: Should return an object
❌ Task 2: calculateAge()
   Error: calculateAge(1990) should return 34
...
Passed: 0/6
⚠️  6 test(s) failed. Keep working on it!

After Completion

Testing Exercise 1: Variables and Data Types
==================================================
✅ Task 1: createPersonInfo()
✅ Task 2: calculateAge()
✅ Task 3: formatFullName()
✅ Task 4: checkAdult()
✅ Task 5: convertTemperature()
✅ Task 6: createGreeting()

Passed: 6/6
🎉 All tests passed! Great work!

Key Features

🔧 Professional Development Workflow

  • Students write code in separate files
  • Run tests via command line (npm/node)
  • Immediate feedback with detailed error messages
  • Mimics real-world development practices

📚 Comprehensive Learning

  • Clear learning objectives for each exercise
  • Step-by-step instructions with examples
  • Progressive difficulty building on previous concepts
  • Multiple solution approaches for deeper understanding

🎯 Automated Assessment

  • Comprehensive test suites with edge cases
  • Clear pass/fail indicators
  • Detailed error messages guide learning
  • Easy progress tracking for instructors

🚀 Scalable and Extensible

  • Easy to add new exercises
  • Consistent structure across all modules
  • Customizable difficulty levels
  • Ready for classroom or self-study use

Getting Started

  1. Prerequisites: Node.js (v14+), code editor
  2. Setup: Download/clone the repository
  3. Start Learning: Begin with exercises/01-variables/
  4. Get Help: Refer to setup-instructions.md

Perfect For

  • Coding Bootcamps: Structured curriculum with automated grading
  • Computer Science Courses: Hands-on JavaScript fundamentals
  • Self-Study: Clear progression with immediate feedback
  • Tutoring: Ready-made exercises with solutions

Ready to start learning JavaScript? Begin with Exercise 1! 🚀