Why Learning JavaScript Is Fun

in #javascript7 years ago

I started Leaning JavaScript in the fall of 2016 and at First it seems really boring but i kept leaning JS because i have to lean I was in a middle of a project which is my first try to web development. So with out JavaScript doing functions in the Client-Side is not possible so i had to lean it.
I was like why i have to go through all these documentation it just like any other programming languages some for ,while , ans for each loops and if ,else if controls. At that point i was really getting bored and decided not to read any guides to lean JavaScript just dig in and start codding like a mad Hacker (Like in the movies not the real world).
Then i started codding like i always do with having only a basic idea of the syntax and not sure how to do anything. As long as we have stack Overflow All the programming related questions wont go unanswered. So i stated coding it was pretty much python lots of functions for you to use (I love C/C++ for their "if you want some thing to be done do it your self" attitude ). If I don't know Something went to W3schools or Stack-overflow for answers and i was like this is just a piece of cake. i was like give me a year i will build Facebook for you.All of that was about to change....!
That was when i had to use Async Programming . I was never into the Async Programming before i was never even used multi threading or no parallel processing methods and i was feeling like why my code is behaving really funny.So i tool my code to Stack Overflow and explained then what am i trying to do and what is the error. Then One guy commented "it is because of JavaScript's Async Programming you have to do that as a call back."
I was like what Async and callbacks ? what the hell are those ?. So i dig in to the internet for answers. After a lots of conversations and reading i decided i have leaned everything about Async and callback now its time for me to code.
So i started codding again and i get stuck every now and then and i tries to experiment by moving the lines of code here and there until it works. After wasting lots of coffee and time i decide to lean more about it.
So as a lazy person i thought why i should read when someone else will read and explain for us. that way i wont have to make sense of the all documentations. So i went to YouTube and searched for "Explain JavaScript Async" like i am commanding YouTube to teach me. I viewed a couple of videos and then one video hit my eye it was a video a young developer talking at a conference so i decided to give it a try and that was really good. I realized that i was seeing JS like other languages that was my mistake JS is a entirely different language. Like none other languages i have learned and worked with JS was different it does not always has to wait for each line to execute and finish. i will come back to the part when the execution of that is completed.

It was more of an event driven language that a line by line executing language. After learning JS for a few months and experimenting with it on a couple of side projects my alliance has changed from python to JS.
Learning JS can be really challenging if you are new to Async Programming but that is the beauty of it throws you challenges which most of the times you have to
solve on your own. Not like all other languages each and every line you code will make you fell in love the language deeper and deeper.

So happy coding.

this was originally posted by me on dev.to

Sort:  

JavaScript can be such a beautiful language. But sometimes it's just...
keyword: "callback-hell"