Some Facts I found Interesting about Javascript

Despite being such a popular programming language, Javascript has some unique and interesting properties which makes it different from other popular languages. Today I am going to point out such ten facts-

  • Javascript doesn’t have any concept of input or output mechanism. It is a scripting language which runs on host environment. And through the host environment, it contacts with the world.
  • Instead of classes, Javascript support OOP with object prototypes.
  • It supports functional programming as functions here can be treated as object and stored in any variables.
  • Along with other common data types, javascript has two different definite data types — undefined and null- which I found interestingly odd!
  • According to the specifications, there is no such thing as ‘Integer’ in Javascript(except BigInt).
  • Strings here can be used ,manipulated as objects too.
  • In Javascript , without assigning a value, a variable can declared. Until a value is assigned, the value will be primarily ‘undefined’ which means uninitialized and it is a constant.
  • In Javascript, using ‘==’ ensures the equivalent values only, but ‘===’ indicates the equivalency of both values and types of two variables.
  • Javascript allows to pass more than expected parameters to functions. What I am trying to say is while defining a function, If I define the function to pass two parameters, but while calling the function I can put less,equal or more than two parameters(as much as I need).
  • Functions can be treated as classes in Javascript.