I'm doing an exercise for my coding class that requires to modify a tree in JavaScript, I think the code is right but testing with console.log, I can't see the leaves:
{
val: 0,
son: [
{ val: 0, son: [Array] },
{ val: 3 },
{ val: 0, son: [Array] },
]
}
I need to know what's inside [Array].