Message from JavaScript talks

May 2017

— 

function modifySimple(val) {
val += 1;
}

function modifyObject(obj) {
obj.prop = 'Hello';
}

let val = 2;
modifySimple(val);
console.log(val);
// still 2

let obj = {};
modifyObject(obj);
console.log(obj);
// now: { prop: 'Hello' }

Message permanent page

— 

Floofies I need to traverse an object, then traverse back up to the root, would you use an array to store a reference to each parent object?

— Or some other structure?

— I already know the keys to traverse down by

— A stack, yes

— Push and pop, right?

— Correct

— Good, good

— You can maintain a "current path" using that ordered set

— In IDDFS it represents a list of nodes to be traversed into

— And not the path

— Why do you need to do this?