A beginner-friendly tutorial walkthrough covering fundamental JavaScript concepts.
JavaScript is a versatile programming language primarily used to make web pages interactive. It's one of the core technologies of the web, alongside HTML and CSS. JavaScript lets you create dynamic content, control multimedia, animate images, validate forms, and much more—all within the browser.
Modern JavaScript (ES6 and beyond) can also be used on the server-side using environments like Node.js, enabling full-stack development with one language.
You don’t need to install anything to start using JavaScript in a browser! However, for local development, here are two ways to get started:
- Open your browser
- Right-click and choose Inspect or press
Ctrl+Shift+I
- Go to the Console tab
- Type:
console.log("Hello, JavaScript!");
Press Enter and see the output.
Node.js allows you to run JavaScript on your computer (outside the browser).
- Go to https://nodejs.org/
- Download the LTS version
- Install it like any normal software
- After installation, open your terminal/command prompt and check:
node -v
npm -v
If both versions show up, you’re good to go! You can now run JS files like this:
node filename.js
learn-javascript/
│
├── .idea/ # IDE project settings (e.g. WebStorm/IDEA)
├── introduction/ # Basic “Hello, World!” and JS setup
├── datatype/ # Variables and data types
├── operator/ # Operators and expressions
├── flowcontrol/ # Conditional statements and loops
├── function/ # Declaring and calling functions
├── LICENSE # MIT License
└── README.md # You are here!
- Clone the repository:
git clone https://github.com/devstoriesplayground/learn-javascript.git
cd learn-javascript
- Explore the content:
- Each folder contains simple
.js
or.html
files with commented code and explanations. - Open them in your browser (for HTML) or run
.js
files via Node.js.
- Each folder contains simple
- Practice by editing code: Tweak examples, add your own
console.log()
, and experiment to learn!
- introduction/ – JavaScript setup and basic output
- datatype/ – Primitives: Strings, Numbers, Booleans,
null
,undefined
- operator/ – Arithmetic, assignment, comparison, logical operators
- flowcontrol/ –
if
,else if
,else
,switch
,for
,while
,do-while
- function/ – Function declarations, expressions, parameters, returns
- JavaScript newcomers
- Self-learners and students
- App developers wanting quick refreshers
Contributions welcome! You can:
- Add more examples or exercises
- Include real-world demos
- Refine documentation
Steps:
- Fork the repo
- Create a branch (e.g.
enhancement-xyz
) - Commit your changes
- Open a pull request
Created by devstoriesplayground – feel free to reach out via GitHub!
Happy coding, and enjoy learning JavaScript! 🚀
This project is available under the MIT License.