title: Functional JS Set all Properties on an Object
body: <p>I have an object <code>myObj</code> like:</p>
  
  <pre><code>{
    0: true,
    1: false,
    2: false
  }
  </code></pre>
  
  <p>To set each value to <code>true</code>, I could use a loop:</p>
  
  <pre><code>for (i in myObj) {
    myObj[i] = true
  }
  </code></pre>
  
  <p>But is there a functional way to do this in javascript? Something like:</p>
  
  <pre><code>myOjb.fill(true)
  </code></pre>