Question: Python's get method for dictionaries lets me specify what should be returned if a key doesn't exist. For my current case I want a dictionary returned. How do I do this in Javascript?

Answer: 
There is no javascript equivalent of the python dictionary get method. If you would write it yourself, as a function, it would look like this:

```
function get(object, key, default_value) {
    var result = object[key];
    return (typeof result !== "undefined") ? result : default_value;
}

```

Use it like:

```
var obj = {"a": 1};
get(obj, "a", 2); // -> 1
get(obj, "b", 2); // -> 2

```

Note that the requested key will also be found in a prototype of obj.

If you really want a method rather than a function (`obj.get("a", 2)`), you need to extend the prototype of Object. This is generally considered a bad idea though, see [Extending Object.prototype JavaScript](https://stackoverflow.com/questions/6877005/extending-object-prototype-javascript)
You could use a proxy for this (really new ):

```
var handler = {
    get: function(target, name){
        return name in target?
        target[name] :
        "Default";
    }
};
var dictionary={"hi":true};
var dict = new Proxy(dictionary, handler);
dict.a = 1;
dict.b = undefined;

console.log(dict.a, dict.b,dict.hi); // 1, undefined,true
console.log(dict.new); //"Default"

 //the proxied object gets changed:

console.log(dictionary.a, dictionary.b,dictionary.hi); // 1, undefined,true
console.log(dictionary.new); //undefined

```

A proxy is an object that reflects all changes and requests trough an handler. In this case we can write/access propertys of dictionary normally, but if we access values that do not exist it'll return "Default"