Lazy getter

Compute a value only when needed, but then only once.

get bar() {
    const bar = getBar()
    Object.defineProperty(this, 'bar', { value: bar })
    return bar
}

Read more