Learning JavaScprit

Posted by Sim Greenbaum on April 30, 2019

I started my coding journey learning Ruby first ,which got me used to a few things. Now that I switched to learning JS there is an adjustment period of getting used to a new language, One of the reasons I chose to learn at Flatiron, is they teach two programing languages.In my opinion the hardest hill to climb over of any coding journey is when you learn you second language. Your head starts to spin and you get really confused but this is only temporary and it only makes sense to do this with the help of your instructor and a great community!

I figured the best way to get used to it ,is to pay attention to the difference and help my mind adjust.

  • No pry - this was the most helpful tool coding in ruby
  • Having to always use the return keyword - this drove me mad as I kept forgetting to return the function and the function inside
  • The {} syntax to close alll blocks of code- dont forget this
  • Js runs Two phases (more about this latter)
  • Hoisting - keep tracking what is and what is not
  • The simplicty of rails and that debugging is much easier

However Js is much more powerful it gives us many more options

  • We can style the front end
  • We use it server side (Node.js)
  • It has callback function which help keep responsibility defined and clear.
  • One of the things I love is being able to pass in function as an argument.
  • Being able to run HTTP request without refreshing the page or AJAX reguests- Thank you Google maps
  • The JS engine is much more forgiving to its master and is quick to throw and error
  • The list goes on and on but all and all it is complex but with a lot of flexibility.

So is JS really the best programming language ? That is the million dollar question it is not going anywhere and it is everywhere but is it really the most powerful, Is it the best at Desktop apps ? Mobile apps? etc. I think the jury is still out on that one.I wouldn’t throw all your eggs in one basket and only learn JS , it is essitional to learn and understand it well but a good programmer should learn at least one other programming language. Once you have mastered two you have the keys and tools to learn many more if needed(you have learnt how to learn).But before you dive in the sea of Js make sure you undersatnd the basic of JS before you start learing Browser APIs, Library APIs, jQuery, React, TypeScript etc. There is alot out there but make sure you build a strong foundation of vanilla JS before you try showing off your skills it will come back to bite you!!!**

Signing off for now,

Sim