This repository contains a collection of basic JavaScript exercises designed to practice different structures, functions, and fundamental concepts of the language. Each file represents an independent exercise and is oriented for people who want to strengthen their JavaScript knowledge from scratch.
Some of the exercises you can find in this repository are:
- Variables and data types
- Operators and expressions
- Conditionals (
if,else,switch) - Loops (
for,while,do...while) - Functions and scope
- Arrays and objects
- Useful array and object methods
- DOM manipulation (HTML + JavaScript)
- Events
- Practical exercises and challenges
Note: Explore the repository to see the complete list of exercises and files.
- Node.js (optional, to run JavaScript code outside the browser)
- Updated web browser (Chrome, Firefox, Edge, Safari, etc.)
Open a terminal or console and execute:
git clone https://github.com/GitTestingPat/Javascript-Basics.git
cd Javascript-BasicsOpen the corresponding .html file in your browser. Inspect the browser console to see the results of the JavaScript exercises.
- Open the terminal in the repository folder.
- Run the desired file with Node.js:
node exercise_name.js- arrays.js: Introduction and manipulation of arrays.
- objects.js: Working with objects and their properties.
- dom_manipulation.html: Example of how to interact with the DOM using JavaScript.
- functions.js: Exercises on declaring and using functions.
Want to add more exercises or improve existing ones? Welcome!
You can fork the repository, add your changes, and submit a pull request.
Need help running any exercise, installing Node.js, or have questions about JavaScript?
Check the official JavaScript documentation or open an issue in the repository.