How to get better at JavaScript: Simple Steps for Improvement

How to get better at JavaScript: Simple Steps for Improvement

ยท

6 min read

Hello reader, ๐Ÿ‘‹

Are you a developer, learning JavaScript, or working with JavaScript and its libraries and frameworks? Well, as a web developer, we all do these things. We follow some path and learn these things and learn them in a sequence order like firstly we learn HTML, then CSS, then JavaScript and, here, I do not know what happens to us, we started hurrying to learn about JS-related libraries or Framework. Either we want to learn React, Vue, Angular, Sevelet, or Next, etc. We think let's get things quickly done in JS and then move forward with these libraries or frameworks because jobs demand these skills, with postings often specifying skills like:

  • Hiring React Developer

  • Hiring a frontend developer, must have 1+ year of experience in react

  • Frontend Job Alert: JS, React, Node JS necessary

Read Book Club GIF

It's easy to feel the pressure to master these tools quickly to meet industry demands. But, are we truly understanding the basics of JavaScript in our rush to learn it? The issue came when we started saying:

  • I know React, but I am not that good at JavaScript

  • Do you know? React is much easier than JavaScript.

  • I'm proficient in Next but a bit shaky in React.๐Ÿ˜…

  • Learning JS is too hard, I'll just stick to React." (๐ŸšจSpoiler Alert: Building without a strong foundation can be risky!)

And after seeing all these things on Twitter or folks around me and after seeing this tweet, I decided to write this blog.

In this blog, we'll learn how should we practice JavaScript so that we can able to understand its core concepts and face much fewer complexities while working with JS libraries and Frameworks. I know, JavaScript has trust issues๐Ÿ˜… but still, we'll try to understand in a better way.

Image

What we'll explore

Alright, enough talking, let's dive in. This blog won't focus on recommending specific courses or playlists or how to structure your daily routine for learning JS. Instead, we'll discuss practical ways to practice JS effectively, enabling us to code things we encounter on our screens every day.

Start with Question...

Start with a question to test your JS level. Ask yourself(and please be honest๐Ÿ˜…)

  • Can I code basic functionalities in Vanilla JS without relying on AI assistance (No ChatGPT, Bing, or Gemini ๐Ÿ™ˆ)?

  • Am I capable of building the logic for functional elements like a scrollbar using just HTML, CSS, and JS?

  • Do I understand the underlying principles of methods like .map and .filter that we commonly use in React or Next?

  • Can I implement the logic behind .map in Vanilla JS without any AI help?

If your answer is yes, that's fantastic! You're on the right track. But if it's a no... well, it's time to seriously consider brushing up on your JS skills. I've been in the same boat. I dove into React without a solid grasp of concepts like promises, event loops, or closures, and eventually hit roadblocks.

After failing some Vanilla JS-based interviews, I realized the importance of strengthening my fundamentals. I had to rethink my learning approach and practice methods. Let's explore how we can better ourselves with JavaScript.

Note
Things that I am going to tell you are not the magical way, these are the ways that I followed and which made me start thinking in a more JavaScript way.

Think in JavaScript

Let's explore how to be better in JavaScript.

  • Spend Time: Start by dedicating quality time with just your pen, paper, and console/terminal. The more you engage with Vanilla JavaScript, the sharper and more logical your thinking becomes. Write down the essentials of what you're learning and tackle related questions.

Working Never Ending GIF by amelietour

Example: Suppose you're studying Promises. Instead of merely watching a video, try solving a variety of problems related to Promises without relying on AIs.

  • Avoid AI: While solving and practicing the questions, do not use AI. Use it, but to generate more unique and different difficulty level questions.

No No No GIF by You Blew It!

Example: Suppose you're working on a problem related to array manipulation. Instead of using AI to find solutions, challenge yourself to come up with different approaches independently.

  • Build Small Things: While we often prepare extensively for interviews, focusing on big topics like Promises and event loops, it's equally important to be adept at building small, practical components. Interviewers often test logical thinking by asking to build simple functionalities like a Loading Bar or Custom Alert.

Working Work From Home GIF by Pudgy Penguins

Example: If you encounter a feature on a website, like a collapsible menu or a form validation, try implementing it in Vanilla JS before resorting to libraries or frameworks.

  • Find Mistakes: This point is somewhat related to the previous one. So, first, try building stuff with Vanilla JS, and then see where you can improve. As a beginner, it can be difficult to determine what is correct and what is incorrect. In this case, we can ask our partner in crime๐Ÿ˜Ž, ChatGPT๐Ÿค—, for suggestions on how to optimize the code. Apply the suggestions (do not copy-paste the suggestions ๐Ÿ™‚) and try to implement the concepts on your own.

  • Learn to Refactor: I know this will be not that related to your JS skills but, after writing a code, if you're able to find out that, "Yes, I can improve these things and I can add or remove these things to make this code more reliable" then, that will level up your coding skills and even you'll talk about your code more confidently. While refactoring,

    • Don't blindly follow all refactoring rules: Context matters. Sometimes, breaking a "rule" might lead to cleaner, more maintainable code. Use your judgment!

Conclusion

So, I followed all of these steps to properly learn JS, and now I understand how things work behind the scenes. It's not difficult to understand. It does not make sense that React is simple yet JavaScript is complicated. React is a fascinating technology, but first, learn JavaScript to build a solid foundation!

Don't make excuses for yourself. JavaScript might be confusing at times, but if you practice it consistently, you will be thrilled about what you see and develop. Try to figure out the logic behind it.

Writing Vanilla JavaScript code is not a waste of time, it's a investment of time

So, invest your time in Vanilla JS, and you will become a more skilled developer. Developers are already becoming better at JavaScript and doing amazing stuff. So, if they can do it, so can we.

To summarise, understanding JavaScript is a journey that involves effort, practice, and a willingness to learn from failures. Never give up exploring, coding, or learning. Thank you for reading this blog. You can also follow me for more content on Javascript, React, Open Source, and other web Development topics.

Connect with me on Twitter, LinkedIn, and GitHub, and I'll see you in the next blog soon.

Thank you for Reading, Happy coding! ๐ŸŒŸ.

Did you find this article valuable?

Support Shivam Katare by becoming a sponsor. Any amount is appreciated!

ย