I create objects using two different notations and then console.log them:
object = {key: 'value', func: function() {}};
console.log(object);
output: { key: 'value', func: [Function: func] }
object.key = 'value';
object.func = function() {};
console.log(object);
output: { key: 'value', func: [Function] }
Why there's a difference in the outputs? Does it matter?