loading...
Cover image for 🚀 5 Reasons Why You Should Bet on JavaScript in 2020

🚀 5 Reasons Why You Should Bet on JavaScript in 2020

blarzhernandez profile image Roberto Hernandez Originally published at Medium ・4 min read

Originally published on Medium

Looking to learn to code? Or are you curious to learn a new programming language? You’ve arrived at the right piece, where you’ll clear yourself of any doubts you usually face at that precise moment. Today I will give you five reasons why you should bet on JavaScript. In the end, you’ll realize the power of creating for the back end, the front end, the desktop, and mobile. Is this not really incredible?

As I said above, whether you’re thinking about learning to program or you simply want to learn a new programming language, the first thing that comes to mind is which programming language you should learn, isn't it?

Great, you’re making decisions. However, your mind is going to explode with the next battle. Let’s see, PHP sounds useful because I can build web pages and server-side web applications. Java seems to be used a lot at the corporate level, Python is highly recommended everywhere too, and with C#, I don’t know too much about it so far. Ok, I think I’ve decided: I think I should learn this one — or this one. Wait, maybe it’s a better idea to get feedback from my friend the software engineer. In the end, their suggestion was to choose one and that’s it; it really doesn’t matter which one. Wow, this is so complicated. Stop! Stop!

Let’s get rid of that battle. I’ll give you compelling reasons why JavaScript represents a safe bet when choosing a programming language.

1. The Power of Creating Apps for Back End, Front End, Desktop, and Mobile

From my point of view, this one is the most important reasons why you should bet on JavaScript in 2020, and even beyond. Some years ago, you only had the power to create applications with JavaScript for the front end and later for the back end.
However, in 2020, you have the ability to create desktop apps built with Electron, which is a framework for creating native applications with web technologies like JavaScript, HTML, and CSS. Some examples of this are: Slack, Whatsapp, Discord, Atlassian, Skype and so on — actually, there is an endless list.

Still not convinced? In 2015 we got React Native, which is an open-source mobile application framework created by Facebook. Now you have the power to use JS/ReactJS to build cross-platform apps: IOS, Android, and web. Is that not really awesome and tempting?
What you need to focus on is that if you know, understand, and stick to the JavaScript core principles, you’ll have the power to create cross-platform apps. JUST ONCE.

2. JavaScript Lives in the Browser and It Runs Everywhere

JavaScript is the standard language of the web. Indeed, it is the de facto language. In 2020, if you learn it, you’ll be able to build not just modern web applications but also any applications for any device and platform.
In addition, you probably have noticed how technologies as a whole are changing. They’re changing in such a huge way that you won’t have finished learning a version completely before a new one is released. And the worst thing is that sometimes they are totally incompatible.

Since JavaScript runs in the browser, you don’t need to pass through any of the pain of the environment or of the editor's configuration.

3. JavaScript is One of the Most Important Pieces in Almost All Websites

Try to disable JavaScript for a minute in the browser and everything will become a headache. You will see how your favorite sites will stop working because they depend heavily on JavaScript. Spotify, Facebook, and Instagram are not even going to load, and you won’t be able to stream music or post comments. Also, Twitter will not update its tweets every second.

4. JavaScript is the Most Popular Programming Language in the World

Based on the Stack Overflow Developer survey 2019, for the seventh year in a row, JavaScript is not just the most popular programming language but also the one most commonly used around the world. Because of that fact, it becomes a good choice either for beginners or seasoned developers.

Most popular programming language

5. There Are a Bunch of Job Offers Everywhere

The last one isn’t the least important. If you are thinking to quit your current job or you’re looking for a new one, you’ll notice a bunch of job offers out there in the JavaScript world. You’ll have great odds of getting in fast and working on an exciting job, on your dream. However, wait a minute — it will not be too easy unless you’re prepared. So please, check the resources in my piece “5 Front-End Predictions and Trends for 2020” which will help you to achieve your goal of a new job.

Wrapping Things Up

Certainly, there are more reasons than these to bet on JavaScript. However, let's summarize what we discussed here.

  • You have the power to build cross-platform apps for the front end, back end, desktop, and mobile.
  • JavaScript is the standard for the web.
  • Websites/sites/app without JavaScript are impossible to make work well.
  • You have high chances of being hired if you learn JavaScript well. There is a crazy race between recruiters to hire JavaScript devs.

Thanks for reading! If this story turned out to be interesting, I’d really appreciate it if you like and share it with your friends. I hope to add a little bit more knowledge to you.

Supporting and follow me on my blog and Medium

Posted on by:

blarzhernandez profile

Roberto Hernandez

@blarzhernandez

React & JavaScript Enthusiast, coding and decoding life => One is More than Zero, Just a Human being and Developer | Blogger@ www.mullinstack.com

Discussion

markdown guide
 

Javascript is the Jack of All Trades, Master of None.

Javascript is a must-have for a front-end interactivity because it is in the shortlist (flash is gone, so the only alternative is js). Also, we don't need to use React, but React is popular for some odd reason, we could do with native js or using jquery (like we used to do since a decade ago). React is funny, it is hard to work, it's messy, and usually, it's raw slow, but it's popular. Why? Beat me.

For the server-side, Javascript is a joke. Why? Because it works asynchronous, but every request requires a work synchronously. So finally, each call ends with lots of patches and hacky solutions. JS (server-side) is tricky and dirt.

And for mobile is a big no. Please, no.

 

"Because it works asynchronous, but every request requires a work synchronously."

Could you elaborate?

As far as I know, the success of Node.js came from the fact that JS is inherently asynchronous and that is what's needed on the backend.

 

Browser -> call web -> nodejs (async) -> (wait until async task) -> return value.

Because it's messy, it's prone to mistakes and some code simply ends blowing with random errors that sometimes happens while other time it works.

It is conventional programming:

  • Task #1
  • Task #2
  • Task #3
  • Return the result

And it is what JS does.

  • Call to task #1 call back and wait
  • Call to task #2 call back and wait
  • Call to task #3 call back and wait
  • Return the result.
  • callback of task #1
  • callback of task #2
  • callback of task #3

If task #1 is not called with await, then it could be executed after or before task #2.

Your arguments are misleading.

It's quite common for programming languages to support asynchronous/parallel evaluation.

Also you don't have to use asynchronous tasks, if you dislike them so much, and declare functions as synchronous.

If task #1 is not awaited, then probably we don't care about it's return value/side effects so there is no problem with order of execution.

In reality the flow in JS is now:

await task #1
await task #2
await task #3
return result

So a bit of a non argument really.

C#

var list=CustomerDal.ListCustomer();
// do something with it.

Java

List<Customer> list=CustomerRepo.listCustomer();

PHP

$list=CustomerDao.listCustomer();

And Javascript

Callback

db.query( 'SELECT * FROM customer', ( err, rows ) => {
  // ... use the result ...
} );

or

Promises

db.query( 'SELECT * FROM customer' ).then( rows => {
  // ... use the result ...
} );

or

await

const list= await db.query( 'SELECT * FROM customer' );

But what if we need to do more operations at the same time, for example, to do a transaction:

codeburst.io/node-js-mysql-and-asy...

That is a lot of minefield.

This author found a creative and clean solution and yet, it is hacky. You won't find this problem in Java, C#, PHP, and Python. Now, if the javascript developer does not know or care about async/await, or lacks of style, then we could have a lot of promises/callback inside another promises/callback and it is a code that nobody can debug or understand it, and it is what usually happens.

Javascript is powerful but

Even a Java developer jr could do it right in the first attempt.

First of all, C# has async/await and it had it even before JavaScript.

Since you mentioned Python, it also has async/await.

Java uses callbacks for asynchronous operations which leads to callback hell, is it really better?

All of these languages has ability to execute code asynchronously or/and in parallel. Your point isn't really valid..

By the way, async/await in JS is only syntax sugar for promises

 

Rightly said - You have the power to build cross-platform apps for the front end, back end, desktop, and mobile.

In addition to these platforms there are Smart Tv and VR also which are being built on Javascript. It's next level language.

 

Thanks for reading and also for sharing your thoughts!

 

To me, JavaScript feels a bit like Lua in game engines.

These engines are written high-performance languages that go down to the metal and you can script your "game logic" in Lua when you need more customization.

The same goes for JS in many places.

If you start something new, chances are good there is a way to use JavaScript for it.

Firefox, Chrome, React-Native, AWS Lambda, Electron, TensorFlow, all systems that come out-of-the-box with JavaScript support.

 

Rightly said, but the only thing I disagree with you is about back-end.
At enterprise level I always prefer to use Java (Spring and its ecosystem) for stability. For little projects it's really good, in general I use node.js servers when I need to create small server for sending mock-data to my front-end app.

About cross-platform framework for apps take a look to Ionic if you are familiar with Angular.

 

Definitely agree with the back-end stuff, I usually go for Symfony or API Platform.

I would recommend checking out React Native and Flutter as alternatives to Ionic, I've had bad experiences working with Ionic, although it is a great tool, the now support React and Vue as well as Angular!

 
 

I just learned programming from 2015. in my opinion, javascript is very good indeed. depending on your needs. you can create a web server quickly on the node, but that's not the best choice. I usually use Node for a prototype. Yes, there are so many programming languages ​​nowadays, and most of us are confused about choosing. But each has advantages and disadvantages. So use the language that best suits your needs.

Good article... Thank you...

 

Javascript is the cornerstone of everything built for the web! (and more if your framework compiles to different supports).

However it might be useful for new developers to also learn different programming languages if they are unsure of where they want to be in the future (python & dart for example).

 

Are there any disadvantages to use JavaScript for everything? I was hoping to see that point covered, it's an honest question since I don't know that language but I'm aware of the hype around it

 

Of course. Javascript in web development is used in places where precursing technologies were way better fit.
HTML is arguably better than JS at displaying content. Browsers are more efficient just displaying styled hypertext compared to executing a heavy framework to render a virtual document.
Backend-wise javascript can have some serious disadvantages compared to other languages, such as weak types, automatic garbage collection, etc... Most of these things can be worked around, but all those workarounds add complexity (which I'd argue is the single most important problem in software development).
Javascript is a very mighty language, but it may not be the best tool for every problem it's being used on.
If all you have is a hammer, every problem looks like a nail.

 

Learning JS doesn't mean it's always the right tool for every job, and you should never use anything else though. It's definitely a good language to learn as it's everywhere and will make you employable. Chances are the company you join will have other languages and you can learn them on the job.

 

It doesn't have the best performance characteristics.

Also, JavaScript is dynamically typed. This can lead to some problems in the long run.

I'd recommend Rust or OCaml/Reason if these points are important.