Top "Object" questions

An object is any entity that can be manipulated by commands in a programming language.

PHP - find entry by object property from an array of objects

The array looks like: [0] => stdClass Object ( [ID] => 420 [name] => Mary ) [1] => stdClass Object ( [ID] => 10957 [name] => Blah ) ... …

php arrays object
What is the difference between __init__ and __call__?

I want to know the difference between __init__ and __call__ methods. For example: class test: def __init__(self): self.a = 10 …

python class oop object callable-object
What is the difference between `throw new Error` and `throw someObject`?

I want to write a common error handler which will catch custom errors thrown on purpose at any instance of …

javascript object error-handling exception-handling throw
How to determine whether an object has a given property in JavaScript

How can I determine whether an object x has a defined property y, regardless of the value of x.y? …

javascript object
How to group an array of objects by key

Does anyone know of a (lodash if possible too) way to group an array of objects by an object key …

javascript arrays object grouping lodash
What exactly is an instance in Java?

What is the difference between an object, instance, and reference? They say that they have to create an instance to …

java oop object reference instance
How to get the size of a JavaScript object?

I want to know the size occupied by a JavaScript object. Take the following function: function Marks(){ this.maxMarks = 100; } function …

javascript memory object sizeof
Can we instantiate an abstract class?

During one of my interview, I was asked "If we can instantiate an abstract class?" My reply was "No. we …

java oop class object abstract
Most efficient way to convert an HTMLCollection to an Array

Is there a more efficient way to convert an HTMLCollection to an Array, other than iterating through the contents of …

javascript arrays object
javascript find and remove object in array based on key value

I have been trying several approaches on how to find an object in an array, where ID = var, and if …

javascript jquery arrays object