What Is JavaScript?

MikkeJavaScript, Programming Languages0 Comments

JavaScript logo

It’s time to get acquainted with yet another awesome language used on web pages you and me visit every day: JavaScript! It’s basically the programming language of the Web, breathing life into most websites you use all the time.

Since JavaScript is present anywhere you look on the Web, it makes for an interesting topic for pretty much anyone surfing online. So whether you’re simply curious to know more about what makes your favourite websites work the way they do or you’re perhaps into web development and programming yourself, this post is for you!

What does JavaScript do exactly and why is it such an important part of web development? That’s what you’re about to find out!

Here’s an overview of the issues I’ll tackle in this post.

  1. What is JavaScript?
  2. What is JavaScript used for?
  3. Is JavaScript easy to learn?
  4. Where to find resources to learn JavaScript?

These were the questions I was asking when I first started making friends with JavaScript. So if you’re new to the language yourself, I’m sure you’ll find some useful answers in this post!

Happy reading!

1. What is JavaScript?

Since you’ll find JavaScript pretty much on all the websites you use daily, it’s interesting to know more about what the language is all about even if you’re not necessarily learning it yourself.

In short, JavaScript is one of the three fundamental languages that power most websites out there. Together with HTML and CSS, they form the “holy trinity” of front-end development. So if you’re interested in web development yourself and wish to create beautiful, modern websites with some awesome interactivity, this powerful trio will do the trick for you!

In two previous posts on my blog, I discussed how to get started with HTML as well as the fundamentals of CSS in more detail.

For a short recap: HTML stands for HyperText Markup Language and it is the starting point for any website. Web developers use it to create the structured content for web pages, such as text, images, and other media, for instance. However, HTML doesn’t really do much to make a website look nice and easy to use. That’s what CSS is for!

CSS, short for Cascading Style Sheets, is the language that creates the styling for the awesome content you first create with HTML. It lets you unleash your creativity with colors, typography, layouts, and much more. In other words, CSS creates the desired look and feel for a web page.

But how does JavaScript relate to HTML and CSS then? To complement the package built with the two, it brings the website alive with interactive and dynamic elements. Websites created with just HTML and CSS are mostly very static and they don’t allow for much interactivity with the user – that’s you! But with a little bit of JavaScript, you can breathe life into the different elements on your website.

2. What is JavaScript used for?

JavaScript is pretty much everywhere you look on the Web. It can store user inputs in variables, run functions with them, do math for you, or simply manipulate the contents of the website when needed.

Even though I still consider myself an absolute newbie with JavaScript, I’ve already seen countless different ways of using it. Now, some of the applications of the language are obviously more sensible than others. Since JavaScript is all about engaging the user and creating more interactivity, it’s surprisingly easy to go overboard with it. For example, perhaps you know those awful pop-up windows on some websites where you have to click “OK” to get rid of the message. Not necessarily the best way to use the language, right? Who would put such a thing on their web page?

Luckily enough, JavaScript can do much more! More importantly, if a JavaScript element is not making it easier and quicker for the user to reach their goal, the language is probably not being used correctly.

So what exactly would be some practical applications of JavaScript then? Once you learn the basics, it’s easy to spot all the different applications on various websites where the language is working its magic. Perhaps you’ll see interactive maps, get timed updates for page contents, or enjoy beautiful animations. That’s all JavaScript working in the background.

Here are a few practical examples of what JavaScript can do for you:

  1. Make websites behave more individually, respond to user interaction
  2. Build web apps and games
  3. Compute and visualize data in spreadsheets
  4. Access and process information on the Web, e.g. find out what’s trending on Twitter

You probably get the idea here: JavaScript is extremely versatile. Personally, this is one main reason why I think JavaScript is so cool!

3. Is JavaScript easy to learn?

This is one question that always comes up when it’s time to learn a new programming language. Or it is for me, at least.

To be clear, it’s unlikely to find a programming language on this planet that’s explicitly easy to learn. But some languages are easier than others, and there are definitely a couple of ways to make learning any language a bit less difficult than it could be.

Out of the holy trinity together with HTML and CSS, JavaScript is definitely the most challenging one to learn in terms of logic and syntax. It’s a “proper” programming language with more dynamic features than in HTML or CSS. That being said, it can be a bit more challenging to learn than those two, especially if you’re totally new to programming. I’m not saying HTML or CSS are easy to learn, but they have a different sort of complexity to them.

Since JavaScript uses variables, functions, and loops, it’s easier to grasp the syntax if you already know another programming language. I learned Python before I started learning JavaScript, which definitely seemed to speed up the learning process. The syntax is of course very different but the structural and logical similarities to Python really helped me along the way.

It didn’t take long for me to write my own little programs or web applications when I started learning JavaScript. Being able to create your own little apps so quickly makes learning it a lot of fun!

For example, since my closest and dearest friends usually have so many questions for each other, I figured it would be great if they could obtain answers to them whenever they needed some. You know, in case someone wasn’t checking their phone for a while or something. That’s what I created The ORACLE for. Simple, easy to code, and fun!

Take a look yourself and let me know if the Oracle could answer your question! And feel free to ask her as many questions as you like, she doesn’t get tired!

white book open

Furthermore, as I’ve said in my previous posts with pretty much anything related to learning programming, there are a few key factors that you should consider to make the process easier for yourself:

  1. Firstly, make sure you have a clear goal in mind. What is it you really wish to achieve?
  2. Secondly, think of why you wish to learn JavaScript in the first place. If you feel an intrinsic curiosity and hunger to learn it, you’re definitely on the right track!
  3. Thirdly, do some extensive initial research to find some great resources suitable for your needs. This will bring structure into your learning.

All three points will help you make the learning process as smooth as it can get!

— See also: 4 Steps to Get You Started With Coding

— See also: How to Choose Your First Programming Language

4. Where to Find Resources to Learn JavaScript?

As with pretty much any programming language, there are way more resources to help you learn JavaScript than you’ll ever need!

I’m currently working through a web development course on Udemy with a great JavaScript module included. It covers the basics and then some with a fun little project at the end of the section. All in all, it makes for an excellent introduction to the language. Not to mention the other units! The course isn’t free, but – pssstUdemy often has different sales promotions going on with special rates!

To save you some time, here are a few of my other favourite online courses and resources:

  • Codeacademy – a great place to start at with lots of free content, especially if you’re completely new to programming. Second JavaScript module available here. Excellent Q&A section!
  • Mozilla Developer Network – this is a very nice free guide for beginners with clear explanations and plenty of content.
  • Learn JavaScript – this is a free interactive tutorial, also good for newbies.
  • Code School – somewhat limited free content, but a good introduction to JavaScript nevertheless.
  • Eloquent JavaScript – a great book about JavaScript and programming in general. Freely available online.

Check them out and see what suits you best!

notebook with laptop

Conclusion

To sum it all up, JavaScript is the third most fundamental layer in the tasty cake of front-end development – alongside HTML and CSS. And it’s a delicious layer indeed!

Each of the three main web development languages is valuable to know on their own already, but it’s the combination that really gets you going. It is JavaScript that makes your websites come alive with interactive and responsive elements. In short, it has the power to make the user experience much more pleasant and interesting.

I hope you found some useful information about what JavaScript is and how web developers use it across the Web. Personally I think it’s a wonderful programming language to learn, especially if you’re already learning HTML and CSS. You can do a lot of fun stuff with JavaScript, and it doesn’t take long for you to be able to create simple applications of your own from scratch!

Additionally, considering JavaScript is so widely used, acquiring strong skills in it probably won’t hurt you in the future!

— See also: How Web Pages Work – Surfing Explained

— See also: Back-End Development vs Front-End Development

Thanks so much for reading! If you liked the post, please feel free to share it so that others can find it, too. Please share your thoughts in the comments below!

Toodles!

<< Previous Post   Next Post >>