As a front-end engineer, I admit that I may be biased, but I really enjoy writing JavaScript programs. JavaScript code can be very elegant or broken. JS has been a joke in the developer community for a long time. But now Javascript is a star language under the spotlight, and more developers are joining this camp. This article illustrates several reasons why I like JavaScript.
Speed
Google's V8 JS engine allows us to better execute JS Code on the client and server, which provides the foundation for complicated JS programs. We can now send hundreds of KB of compressed JS Code to the client, and it is expected that the client can smoothly execute the code.
In addition, JS is very easy to write and test. Write, save, and refresh. You can see the effect in three simple steps, which is faster than any other development environment. We now also have the webkit console and debugger, which can help us easily debug code. I recently tried to use Jasmine for unit testing.
Simple
Javascript is a very lightweight language with no complicated reserved words and no complicated data types. JSON has become a popular data transmission format. JS is also the local language of Web browsers, and there are many tools to support, almost no installation work.
Free
Maybe the author of The JS framework wants to streamline the code as much as possible, or they should keep simple by default. I found that all JS frameworks are not very invasive, unlike Rails, Rjango, cakePHP must write the code in the agreed format. Popular JS frameworks such as jQuery, Underscore. js, and Backbone. js are fully readable and focused, and their designs can be integrated with each other.
Plasticity
Deleting code is a happy process because it reduces complexity, fixes bugs, and reduces the amount of code. Therefore, I enjoy the process of deleting my own spam code. Due to the re-design of the page or the change in requirements, the front-end code has a short life cycle. Modularization is the natural property of browser-side JS, which allows me to refactor a component without making a mess of all the code.
Http://allenc.com/2012/02/why-javascript-is-a-joy/.