Skip to main content

Posts

Showing posts from December, 2014

The wierd yet awesome world of Javascript!!

Hey, Back, again!! This time we will talk about some weird things which only happen in JavaScript. When I say weird, it means that if you come from a C++ or PHP or JAVA background it will be hard for you to digest that many concepts that we learned for those languages, and then think will apply in all the majority of programming languages out there, don't anymore apply here in JavaScript. A very classical and highly cited example is Objects and Inheritance without Classes, well I never imagined this could be done, but JavaScript does it, that too elegantly. Probably you are already aware that for Class JavaScript uses function(){} and not the conventional OOP Class. Well actually it uses or rather can use function for multiple other uses as well. Lets go through some of the amazing features of JavaScript. Loosely Typed Try this for a function in your browser console - If you look carefully here, func is a variable(in the way it is defined) which is used as a func