Skip to content

A comprehensive collection of JavaScript code snippets, algorithms, and mini-projects for learning and reference purposes.

License

Notifications You must be signed in to change notification settings

ehsanghaffar/javascript-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JavaScript Code Collection

A comprehensive collection of JavaScript code snippets, algorithms, and mini-projects for learning and reference purposes.

🚀 Overview

This repository serves as a learning resource and reference guide for JavaScript developers, containing various implementations of:

  • Data Structures & Algorithms
  • JavaScript Methods & Features
  • UI Components & Interactions
  • Utility Functions
  • Web APIs & Browser Features
  • Programming Challenges

📂 Project Structure

The repository is organized into multiple directories, each focusing on specific concepts or features:

Algorithms & Data Structures

  • js-algorithms/ - Common algorithmic implementations
  • binary-search-algorithm/ - Binary search implementation
  • graph-traversal/ - Graph traversal algorithms
  • recursive-factorial/ - Factorial calculation using recursion

JavaScript Features & Methods

  • arrays-methods/ - Array manipulation examples
  • string-methods/ - String manipulation utilities
  • date-methods/ - Date handling examples
  • reduce-method/ - Examples of Array.reduce()
  • generators/ - JavaScript Generator functions
  • flat-flatmap/ - Array flattening methods

Browser APIs & Web Features

  • web-worker/ - Web Workers implementation
  • fetch-api/ - Fetch API examples
  • local-storage/ - Local Storage usage
  • camera-access/ - Browser camera API
  • touch-events/ - Touch interaction handling
  • mouse-methods/ - Mouse event handling

UI Components & Projects

  • snake-game/ - Classic Snake game implementation
  • quiz/ - Interactive quiz application
  • accordion/ - Accordion component
  • matrix-bg/ - Matrix-style background effect
  • speed-typing/ - Typing speed test game
  • pwd-generator/ - Password generator tool

Utility Functions

  • RGB-to-hex/ - Color format conversion
  • decimal-to-binary/ - Number system conversion
  • email-validation/ - Email validation utilities
  • password-validator/ - Password validation
  • text-to-img-server/ - Text to image conversion

React & Modern Web

  • react/ - React.js examples
  • vanilla-web-components/ - Web Components
  • rxjs/ - RxJS examples
  • d3-parliment/ - D3.js visualization

🛠️ Getting Started

  1. Clone the repository:
git clone https://github.com/[username]/js-beginner-pr.git
  1. Navigate to any project directory:
cd [project-directory]
  1. Most projects can be run directly in the browser by opening the HTML file, while some may require a local server or additional setup (check individual project directories for specific instructions).

📚 Learning Resources

Each directory contains specific examples and implementations that can be used as:

  • Reference for implementing common JavaScript patterns
  • Learning material for JavaScript concepts
  • Code snippets for common programming challenges
  • Examples of browser API usage

🤝 Contributing

Contributions are welcome! Feel free to:

  • Add new examples
  • Improve existing implementations
  • Fix bugs
  • Add documentation
  • Suggest new features

📄 License

This project is licensed under the terms of the LICENSE file included in the repository.

🔗 Additional Resources

  • Check individual project directories for specific documentation
  • Explore the challenges/ directory for programming exercises
  • Visit useful-Snippets/ for commonly used code snippets

About

A comprehensive collection of JavaScript code snippets, algorithms, and mini-projects for learning and reference purposes.

Topics

Resources

License

Stars

Watchers

Forks