var entity = new IgeEntity(); entity.addGroup('g1', 'g2'); // This will output "['g1', 'g2']" console.log(entity.groups());