Skip to content

JavaScript

Waqas Ali edited this page Sep 27, 2018 · 3 revisions

So you already know HTML and CSS, next stop is JavaScript and after that you can literally create anything!

Once you write a website using HTML and CSS, it stays the same. Let's say you create an index.html file and store it somewhere on the Internet so anyone can open it. Now let's say you want to show the weather in Hong Kong to your visitors. But you can only hardcode the current weather right? If someone opens your website two days from now, it will be invalid. How do we solve this?

Well, the first thing that comes to my mind is that you open the Hong Kong Observatory's website every morning and update your index.html with the predicted weather for the day. This way it will be accurate every day right? Yes but it is too time consuming.

What if there was a way to automate it? What if there was a script which shows your HTML/CSS but just replaces the weather with the current weather? That is where JavaScript comes in. Whenever someone opens your website, JavaScript will fetch the weather from Hong Kong observatory, write the HTML/CSS you wrote and just replace the weather with the current weather.

But before learning how to use JavaScript for websites, we need to learn JavaScript itself. This is what this tutorial is for. If you don't know programming, by following this tutorial you are also learning how to code.

JavaScript is an immensely powerful language which can do anything from websites to backend systems to machine learning. (Read What is JavaScript, and why is it important? if you want to learn more about its potential)

We will use FreeCodeCamp again because it teaches you by making you do rather than watch stuff.

What to do:

  1. Complete Basic JavaScript Exercises
  2. Complete Basic Data Structures Exercises
  3. Complete Debugging Exercises
  4. Complete Basic Scripting
  5. Create one of the projects listed here and share in the main WhatsApp group! (We would love to see your progress 😃)

If you face any problem, do the following until you solve it:

  1. 💻 Use "get a hint" or "watch a video" option on FreeCodeCamp.
  2. 🔍 Google for at least 10 minutes. (The Read-Search-Ask Methodology for getting unstuck)
  3. 📱 Send a message in the Turing Club WhatsApp group and someone will help you out.

Congratulations on finishing! 💃

If you have any suggestion or feedback about this tutorial, share it in the group so we can improve it for those after you.