/tags/object
- JavaScript: Array-like objects
What are array-like objects in JavaScript? Have you heard about array-like objects in JavaScript? If no, this is a good post to learn about them. Array-like objects are not a separate object type, th...
- JavaScript: Check if object property is defined
How to check if a property is defined in an object Probably you know how to check if a variable is defined in JavaScript or not (without crashing your app with a fatal ReferenceError). In case you di...
- JavaScript: Get object size
How to get the size of an object in JavaScript Arrays in JavaScript have a length property that gives you the number of items in an array. Objects on the other hand, don't have a length or size prope...
- JavaScript: get the number of properties in an object without looping
How to get the number of properties in a JavaScript object without looping Unlike arrays, JavaScript objects do not a have a length property which gives you the number of properties / items in an obj...
- JavaScript: Object as object key
Can you use objects as Object keys in JavaScript? The short answer is "no". All JavaScript object keys are strings. Even if you pass an object as a key, the object's toString() will be called on it, ...