Learn JavaScript for Free: A Beginner's Guide to Getting Started with JavaScript
Tags: javascript, webdev, discuss, resources
Published: 2024-03-28 09:01:35

## Introduction

Hello 👋 today I'm going to discuss what is JavaScript, what can it do, and by the end of the post I will be leaving some free and useful resources to get you started with JavaScript!

## What is JavaScript?

According to [MDN](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/What_is_JavaScript)

"_JavaScript is a scripting or programming language that allows you to implement complex features on web pages — every time a web page does more than just sit there and display static information for you to look at — displaying timely content updates, interactive maps, animated 2D/3D graphics, scrolling video jukeboxes, etc. — you can bet that JavaScript is probably involved. It is the third layer of the layer cake of standard web technologies, two of which (HTML and CSS)_"

**So, to summarize, JavaScript is the Programming Language for the web which helps in adding interactivity to our web applications.**

## What can JavaScript do? <br><br>

### 1. Running code in response to certain events occurring on a web page.

We can use eventlisteners in JavaScript to perform a certain action when a certain event is triggered, for example:  

```javascript
const button = document.querySelector("button");

button.addEventListener("click", (event) => {
  button.textContent = `Click count: ${event.detail}`;
});
```
By this we can easily get to know how many times a button is clicked!

### 2. JavaScript can change CSS styles
We can use JavaScript to dynamically change the CSS properties of an element as we can set CSS styles for one or more elements in the DOM, modify, remove, or even change the entire stylesheet for your page.

```javascript
document.getElementById("demo").style.fontSize = "35px";
```

### 3. JavaScript allows us to fetch information and display it on our website.

The **Fetch API** provides a JavaScript interface for accessing and manipulating components of the protocol, such as requests and responses.

It is as simple as this:

```javascript
async function logMovies() {
  const response = await fetch("http://example.com/movies.json");
  const movies = await response.json();
  console.log(movies);
}
```

### 4. JavaScript can be used to make Mobile Applications  <br> 
_"Mobile apps make it easier for users to access information, services, and products from their mobile devices anywhere and at any time. Mobile apps allow businesses to engage with their customers through personalized experiences, notifications, and real-time updates. And JavaScript frameworks are very useful in mobile app development. JavaScript frameworks can be used to develop such mobile apps that can run on multiple platforms with the same codebase which effectively reduces the development time and cost."_

[source - GeekForGeeks](https://www.geeksforgeeks.org/top-javascript-frameworks-for-mobile-apps-development/#:~:text=Mobile%20apps%20make,time%20and%20cost.)

**Hence, javascript allows programmers to create mobile apps by using various libraries built be other coders to make our development experience streamlined.**

<br>

## Resources to get you started with JavaScript! <br>
So, now I will be providing you **best free resources for beginners to get started with JavaScript and learn JavaScript easily!**

- [**freeCodeCamp.org JavaScript crash course**](https://www.youtube.com/watch?v=PkZNo7MFNFg)

- [**JavaScript basics playlist by Beau, freeCodeCamp.org**](https://www.youtube.com/playlist?list=PLWKjhJtqVAbk2qRZtWSzCIN38JC_NdhW5)

- [**Learn JavaScript with examples, freeCodeCamp**](https://www.youtube.com/playlist?list=PLWKjhJtqVAbleDe3_ZA8h3AO2rXar-q2V )

- [**W3Schools - JS**](https://www.w3schools.com/js/ )

- [**Full JavaScript Developer Roadmap, roadmap.sh**](ttps://roadmap.sh/javascript )

- [**MDN JS guide**](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide )

- [**MDN JS reference**](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference)

- [**JavaScript tutorial, geekforgeeks**](https://www.geeksforgeeks.org/javascript/)

These JavaScript resources are enough to get you started.

I hope you enjoyed reading the post!
Thanks for reading!
Feel free to comment down your thoughts.



Stay Safe :D