Will the two arrays also be deleted ?
They'll be eligible for garbage collection, assuming nothing else has any references to them. And nothing will, based on that code. When and whether they're actually cleaned up is up to the implementation.
But note that they're eligible for GC even before you remove bar, because your code is doing something quite odd. See the comments:
// Creates a blank object, so far so good.
var obj = {};
// Sets the `bar` property to the number 123.
obj['bar'] = 123;
// Retrieves the value of `bar` (the primitive number 123) and
// *converts* it into a `Number` instance (object), then
// creates a property on that object called `foo`, assigning a
// blank array to it. Because the Number object is never stored
// anywhere, both it and the array are IMMEDIATELY eligible for
// garbage collection. The value of `obj['foo']` is unaffected,
// it remains a primitive number.
obj['bar']['foo'] = new Array();
// The same happens again, a temporary Number instance and
// array are created, but both are IMMEDIATELY eligible for
// garbage collection; the value of `obj['bar']` is unaffected.
obj['bar']['xyz'] = new Array();
So you didn't even have to remove bar, the arrays were instantly eligible for garbage collection. This happens because in JavaScript, numbers are primitives that can be automatically promoted to Number objects — but that doesn't affect the value of the property the primitive number is assigned to. So:
var obj = {};
obj['bar'] = 123;
obj['bar']['foo'] = []; // [] is a better way to write new Array()
console.log(obj['bar']['foo']); // "undefined"
If you change your obj['bar'] = line to:
obj['bar'] = {};
or
obj['bar'] = []; // Arrays are objects
...then the foo and xyz properties will not instantly disappear, and the arrays will stick around until bar is cleaned up.