The problem which I don't understand it that when I console.log the first time, it also has added the Array (extra with the key and value (welcome and '2') How is this possible?
var testarray = {
"welcome": "1"
}
console.log('start');
console.log(testarray); // Shows also the extra array already.
console.log('end');
testarray.extra = [];
testarray.extra.welcome = '2';