DEV Community

Cover image for Learn JavaScript for Free: A Beginner's Guide to Getting Started with JavaScript
Spandan Sehgal
Spandan Sehgal

Posted on • Originally published at span41n.vercel.app

Learn JavaScript for Free: A Beginner's Guide to Getting Started with JavaScript

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

"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?

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:

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

button.addEventListener("click", (event) => {
  button.textContent = `Click count: ${event.detail}`;
});
Enter fullscreen mode Exit fullscreen mode

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.

document.getElementById("demo").style.fontSize = "35px";
Enter fullscreen mode Exit fullscreen mode

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:

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

4. JavaScript can be used to make Mobile Applications

"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

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

Resources to get you started with JavaScript!

So, now I will be providing you best free resources for beginners to get started with JavaScript and learn JavaScript easily!

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

Top comments (0)