JavaScript objects and Prototype
The beauty about JavaScript is that every single thing you see in JavaScript is an object. Isn’t is beautiful, a variable,string,number or even a method is an object. So, whenever you say ‘Object’, what comes to your mind is ‘properties’ and ‘methods’. An example speaks louder than 20 lines, so here goes..