A collection of basic JavaScript programs and exercises created while building a strong foundation in core JS concepts before moving on to React. This repo covers fundamental topics that are essential for understanding how React works under the hood.
- 📌 Variables & Data Types (var, let, const)
- 🔁 Loops (for, while, forEach)
- 🧩 Functions & Arrow Functions
- 📦 Arrays & Array Methods (map, filter, reduce)
- 🗂️ Objects & Object Methods
- ⏳ Conditional Statements (if-else, switch)
- 🎯 DOM Manipulation
- ⚡ Events & Event Handling
- 🔄 ES6+ Features (destructuring, spread/rest, template literals)
- 🌐 Asynchronous JS (callbacks, promises, async/await)
React is built on top of core JavaScript concepts. This repo is a practice ground to strengthen those fundamentals — like array methods (map, filter), functions, and ES6 syntax — that are used everywhere in React development.
- Clone the repository
git clone https://github.com/your-username/your-repo-name.git- Open any file in your code editor or browser console
- Run using Node.js
node filename.jsor open the corresponding .html file in a browser (if applicable)
js-basics-for-react/ ├── variables/ ├── loops/ ├── functions/ ├── arrays/ ├── objects/ ├── dom-manipulation/ ├── es6-features/ └── async-js/
After completing these exercises, the plan is to move on to building projects in React, applying these JavaScript fundamentals in a component-based structure.
This project is open source and available under the MIT License.