Hi! My question is going to be a lengthy one, so I'll have to break it into multiple messages, I apologize.
I'm trying to create an Apps Script, and I've been trying to implement a Default Dictionary. So far, I've been able to yoink a couple of things that didn't end up working, the first one was this:
class DefaultDict {
constructor(defaultInit) {
return new Proxy({}, {
get: (target, name) => name in target ?
target[name] :
(target[name] = typeof defaultInit === 'function' ?
new defaultInit().valueOf() :
defaultInit)
})
}
}