JavaScript

JavaScript, ever since its first standardized version as ECMAScript (ES) in 1997, has been the key coding language for web technologies. Today, JavaScript can run virtually everywhere, making it a practical choice for cross-platform development and reuse of the same skill set. As its name implies, JavaScript is a scripting language. It is parsed and interpreted during runtime, and only then is it executed by the relevant platform.

Another matter of JavaScript that causes controversy is its dynamic type system. JavaScript, as with most languages, does have a type system.  Although a type is not specified while declaring a variable, variables have the type of the last value assigned to it. Consequently, this also means variables in JavaScript can change types dynamically.

JavaScript is considered a functional language, meaning functions in JavaScript are first class citizens, and a function is just another object like anything else. You can pass functions as parameters, usually referred to as callbacks, return functions, and even instantiate them.

For many years, JavaScript hasn't had a steady and rapid update pace. At the time web apps started to grow steadily, the version was ES5, which was released in 2009. During this time, JavaScript developers suffered mostly around encapsulation. Even though there were good practices to achieve proper encapsulation, many JavaScript developers were not aware of or keen on doing so. Then, with JavaScript ES6 (aka ES2015), JavaScript made a great leap forward. With this release, JavaScript developers enjoyed the addition of class-based object-oriented programming, modules, destructuring, generators, and more.

It's important to note that object-oriented-like programming was still possible even in ES5. The inheritance model of JavaScript is based on a prototype system wherein every object has a prototype that you can manipulate, and even extend an existing one. Actually, the built-in class-based programming that ships with ES6 is basically a syntactic sugar over the same underlying prototype system.

JavaScript, due to its dynamic nature, lacks static typing in what is usually referred to as being a strongly typed language. This can certainly present difficulties, especially in cases of large teams, changes of personnel, a big code base, and the use of external libraries.
Thankfully, other languages have surfaced in order to improve this situation; currently leading the field are TypeScript and Flow. In addition to static typing, such languages provide additional benefits such as faster updates, experimental features, configurable project-specific adjustments, external type definitions, and more.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.150.41