DEV Community

Danish Saleem
Danish Saleem

Posted on

Introduction to JavaScript

These days, it is difficult to find sites that do not allow visitors to interact with them. Think sliders, web galleries, animations and whatever other interactive events that pop out when you press some button. The processing of user input, the ability to send/receive data from servers and other interactive behavior are provided by JavaScript.

What is JavaScript

JavaScript (JS) is one of the most used programming langauges. It was created by Brendan Eich in 1995, and it took him ten days. You read it right: JavaScript was really developed in just ten days!

JavaScript Logo

According to GitHub 2018, JS top the list of the most popular programming languages. It is used for both front-end and back-end development.

JavaScript is not Java. These are different programming languages. Their similar names were are marketing move to draw attention to the new language and take advantage of the popularity of Java.
Enter fullscreen mode Exit fullscreen mode

JavaScript is based on the ECMAScript standard (often shortened to ES). The latest version of the standard is ES11.

The first Program

Programs written in the language are called scripts. Here is an example of a simple JS script that prints I am starting to learn JavaScript!:

console.log("I am starting to learn JavaScript!");
Enter fullscreen mode Exit fullscreen mode

All modern browsers have a built-in program that allows you to execute JS directly in them. Let's look at the result of our first program in browser. To do this, press

Ctrl + Shfit + J/Ctrl + Shfit + K on windows

OR

Cmd+Opt+J/Cmd+Opt+C on Mac
Enter fullscreen mode Exit fullscreen mode

write the JS code in the opened console, the press Enter.

Console

As you can see, the result of our first script was the line I am starting to learn JavaScript!.

The browser console is not always easy to use, so you can also run this code on this site.

Conclusion

JavaScript has a huge community of developers all over the world. This programming language is easy to learn and pleasant to write programs in. You will still come across difficulties, but when you do, you can always asks other programmers for help or even find a ready-made answer!


Let's connect 🤝

You can connect with me on Twitter, LinkedIn, GitHub, Discord


Support me ☕

You can support me on Buy Me a Coffee

Top comments (0)