How to get length of Javascript Object

Introduction : There is no direct method to find length of an javascript object so I have created a method by which we can get length of javascript object. Use following method to get the length of javascript object. Object.size = function(obj) { var size = 0, key; for (key in obj) { if (obj.hasOwnProperty(key)) 

Continue Reading…