Skip to content

Essential JavaScript & DOM syntax cheat sheet with explanatory comments for beginners and intermediate learners.

Notifications You must be signed in to change notification settings

Kamyar2004/teach-JavaScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

📘 JavaScript & DOM Essentials

JavaScript Level Purpose

Welcome to this JavaScript educational repository. This collection is designed to serve as a Cheat Sheet and reference guide for students and developers.

It contains two main JavaScript files, each packed with syntax examples and concise comments explaining the functionality. Whether you are reviewing the basics or looking up DOM manipulation methods, this repository provides a clean and structured resource.


📂 Repository Contents

1️⃣ beginner.js (Fundamentals)

This file covers the core building blocks of the JavaScript language. It includes syntax and usage examples for the following topics:

  • Console: Logging, warnings, and errors.
  • Variables: var, let, and const.
  • Comments: Syntax for single-line and multi-line comments.
  • Data Types: Primitives and reference types.
  • NaN: Understanding "Not-a-Number".
  • Interaction: alert, prompt, and user dialogs.
  • Type Conversion: Explicit and implicit coercion.
  • Operators: Arithmetic, comparison, and logical operators.
  • Ternary Operator: Conditional logic shortcuts.
  • Functions: Declarations, expressions, and arrow functions.
  • String Methods: Manipulation and formatting.
  • Math Methods: Using the built-in Math object.
  • Objects: Properties, methods, and accessors.
  • Arrays: Creation and indexing.
  • Array Methods: Iteration and manipulation techniques.

2️⃣ dom.js (DOM Manipulation)

This file focuses on how JavaScript interacts with the HTML Document Object Model. It covers intermediate topics required for dynamic web development:

  • DOM Selectors: Methods to access HTML elements.
  • HTML Attribute Methods: Getting, setting, and removing attributes.
  • HTML Class Methods: Managing CSS classes dynamically.
  • Mouse Events: Handling clicks, hovers, and movement.
  • Keyboard Events: Listening for key presses and input.
  • DOM Manipulation: Creating, appending, and removing elements.
  • Timing Events: Using setInterval and setTimeout.
  • Date Methods: Working with time and dates.
  • Input Methods & Events: Handling form data and user input.

🚀 How to Use

  1. Clone or Download this repository.
  2. Open the folder in your preferred code editor (e.g., VS Code).
  3. go to the scripts directory.
  4. Open beginner.js or dom.js to read the syntax and comments.

⭐ Comprehensive syntax reference for modern JavaScript development.

About

Essential JavaScript & DOM syntax cheat sheet with explanatory comments for beginners and intermediate learners.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published