Which programming language should I start with?

One of the most common questions about programming is what language should be used. I think that at this point in time the answer is clearly JavaScript. The reason is simple: it's everywhere a browser is, and it is powerful enough to be way more than a toy.

How do I get started with JavaScript?

Press F12 on this browser window. Or Hamburger Menu→More Tools…→Developer Tools→Console.

How to open the developer Tools

Now you should see something like the following image, and do note which "tab" is selected, and if different, click on the correct one!


Your first program

Let's tell the computer to write out your name. Here's how I did it for mine, type next to the > something like

console.log("Sklivvz is a nice person")

and press enter. Result? The computer knows how to treat me right.

I am a nice person

Programmers write… programs. A program is a set of lines of code executed in sequence. We can either type these instructions in sequence, or we can build a list of instructions and execute them all at once. Try typing this

function program() {
    console.log("Sklivvz is a nice person")
    console.log("And this is a second line")

As you can see, nothing is printed when you press Enter, just undefined. The computer has stored your program but is waiting for your command to execute it. In order to do so, use the following command:


My first program

Next steps

Hopefully this piqued your interest! If you want to know more and learn more commands to give to your computer you can head off to javascript.com where there is a nice tutorial.

I also am publishing a series of beginners posts, starting with variables here.

Have fun!

Hi, I'm Marco Cecconi. I am the founder of Intelligent Hack, developer, hacker, blogger, conference lecturer. Bio: ex Stack Overflow core team, ex Toptal EM.

Read more

Newest Posts

Guest blog: Building, in partnership with communities by Shog9

A lesson in building communities by Stack Overflow's most prominent community manager emeritus, Shog9

Read more
Can you migrate a company from on-premise to remote-only?

Some lessons learned over the past 8 years of remote work in some of the best remote companies on the planet

Read more
Announcing Intelligent Cache, our caching library

Our newest open source initiative, intelligent cache, is available for use

Read more
Guest Blog: The mythical 10x programmer by Antirez

In this post, Salvatore Sanfilippo puts together a list of qualities that I believe make the most difference in programmers’ productivity.

Read more

Today I want to introduce our second engineering team: Team EMEA

Read more


And the Most Realistic Developer in Fiction is...
Julia Silge • Mar 28, 2017

We can say that Mr. Robot is having a moment. The main character was one of the top choices and thus is perhaps the most/least realistic/annoying/inspiring portrayal of what it’s like to be a computer programmer today.

Read more…