Object.defineProperty throws an error because config is not defined
<p>I'm reading the book JavaScript design Patterns by Addy Osmani, why did he use config like this when It does not work?</p>

<pre><code>var defineProp = function ( obj, key, value) {
  config.value = value;
  Object.defineProperty(obj, key, config);
}

var man = Object.create(null);

defineProp( man, 'car', 'Delorean');
defineProp( man, 'dob', '1981');
defineProp( man, 'beard', false);

// As we will see a little later in the book, these methods can even be used for inheritance, as follows:

var driver = Object.create(man); 
defineProp(driver, 'topSpeed', '100mph');
driver.topSpeed // 100mph
</code></pre>