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.
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, andconst. - 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.
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
setIntervalandsetTimeout. - Date Methods: Working with time and dates.
- Input Methods & Events: Handling form data and user input.
- Clone or Download this repository.
- Open the folder in your preferred code editor (e.g., VS Code).
- go to the
scriptsdirectory. - Open
beginner.jsordom.jsto read the syntax and comments.