Interesting and Unique Things of Javascript World


I already learned many programming languages, and each language has interesting aspects and their uniqueness.

At first time I only learned Javascript as tool to add interactivity in website when I came to website development but lately I had to learn it for more serious purpose, especially for nodejs development, so I need to relearn and learn Javascript deeper.

So I write down the interesting things I found from Javascript world  on my learning journey in this article.

  1. Number as object type

Usually in other programming languages there is difference type for integer and float, but Javascript only knows one object type for number so “There’s no such thing as an integer in JavaScript” that I found from Mozilla docs.

2. Undefined

There is “undefined’ value on Javascript which is a value of type undefined that indicates an uninitialized value. Usually on other language, the unitialized value is same as “null” or “nil”. But Javascript has both undefined and null

3 . Tripe equals operator

Why Javascript has tripe equals operator to compare equality? Because Javascript will return comparison result between 123 == “123”  as true because of type coercion so it need to have triple equals operator to avoid type coercion and will return result of 123 === “123” as false.

4. Callback functions

Functions are first-class objects in Javascript, we can pass a function as an argument in another function and later execute that passed-in function or even return it to be executed later. This is the essence of using callback functions in JavaScript. Callback functions are probably the most widely used functional programming technique in JavaScript and can create “heaven” or “hell” in our code if it is used wrongly. That’s why we often heard “callback hell” phenomenon in Javascript world.

5. HOT in front end and server side

Only Javascript can conquer the reign of hot programming language popularity for both front end and server side developers because Javascript has NodeJs which is “Event-driven I/O server-side JavaScript environment based on V8”.  So I think this is the most interesting and unique aspect  of Javascript.

Will add more … if I find new things