10 Things to Master About Javascript Before You Call Yourself a Pro

Before Semicolon
Oct 14 · 5 min read
Image for post
Image for post

Javascript has changed a lot over the years and has become one of the most popular languages out there. It is mine and lots of developer's favorite/preferred coding language so here are 10 things you should definitely try to master first.

The “this” is one of the most confusing things about Javascript and with ES2020 we got “globalThis” which definitely helps to streamline things and set a clear distinction between the other “this”.

The reason we got “globalThis” is because in the browser global is the “window”, in NodeJs it is “global” and inside workers its “self”. What a mess right?

Some languages like swift and python call it “self” and others like Java call it “this” but the Javascript “this” behaves differently.

The “this” can refer to the instance of an object or class. It also changes depending on how a function is called. It is the context where you are and also changes when you are in strict vs non-strict mode. Need more reason to truly try to master it?

Almost Everything in Javascript is objects. This should be the sole reason to seek to master objects in Javascript but let me tell you more.

Class and Array are two examples of things that are just objects under the hood. To understand Objects you need to understand the prototype nature of Javascript including prototypical inheritance and prototypes.

These properties are what allow Javascript to be so flexible and one of the core reasons you can use it to do almost anything. Every library and tool you use, play with objects prototype under the hood and it will make you want to create things.

After you master Objects you must master Class which are just objects and a constructor function under the hood.

When you understand Objects you will understand the limitations and power of Javascript classes. If you came from an object-oriented language or are a fan of Object-Oriented Programming the introduction of classes makes whole that possible.

Classes have become a go-to for developers to avoid dealing with the weird prototype nature of Javascript and only focus on the thing being built.

I tried to explain scope and closure to someone and it hit me. People are often confused by them and don't realize how scope dictates a lot about how the code is executed given a context.

For me, scope is about creating boxes and closure is just a special box. I actually created a video trying to explain it. Let me know what you think?

Understanding scope will help you create code that works together and closure is just a powerful tool you should use if you like the idea of encapsulation and functional programming.

This is a huge topic but I could not do the things I do today and understand how things on the web are created without understanding Data Structures.

It is an important topic in any language and particularly Javascript where arrays are not actually arrays?

Understanding Data Structure is what gives you the Engineer mindset. It is a piece of knowledge that truly makes you stand apart from other developers.

This is pretty much the definition of Javascript and understanding what it means is pro-level stuff.

Understanding why Javascript is single-threaded will tell you what kind of application it is better for.

I actually read a good article on this but I recommend you to truly research the title of this section and make yourself acquaintance with the language.

Whenever I code in other Languages there is nothing I play around with more than promise and async-await, and I love Javascript Promise and Async await.

Here is something you need to understand how Javascript works to understand it. Promises are just magical and give s asynchronous programming a whole lot of purpose.

Promises and async…await allow you to deviate from the traditional linear way to execute programs which for a single-threaded language like Javascript, make it more powerful and fast to compute a lot of things quickly without resourcing to create dedicated threads.

Promises + single thread makes Javascript one of the top options to build fast and reliable Rest Api and real-time communication apps.

In my opinion, nothing beats Javascript functions. It checks every box and it is the second most powerful thing about the language right after Objects.

Because Javascript is so flexible and rich it allows you to program in any style and one of them being the functional programming style.

You can do anything with function and the tricks related to functions are just endless. If you like functional or any other declarative style programming you must Master functions.

This is the basis of any language. Learning how things work step by step will allow you to put together simple to complex algorithms that will allow you to create more complex programs.

Control flow is understanding how things are executed step by step and how it affects the structure. It will help you debug and understand any application quickly even if you did not write it.

At some point you will need to make requests and dealing with data fetched over the network is an essential skill especially now that data is a huge part of any application.

Knowing your way around using the fetch or XHR API will come in handy but you are not limited to native APIs like these. The goal is to know your way around data fetching over the network in your application.

At some point, you will have to deal with huge data load or applications that rely on a lot of data.

Your way of becoming a pro is in these little parts. Mastering each little by little with a whole lot of practice.

It won’t matter if you just read about it. You must try it over and over in as many different situations as possible.

Best of luck!

The Startup

Medium's largest active publication, followed by +733K people. Follow to join our community.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store