title: How does function declaration by square brackets work in Node.js / Javascript?
body: <p>First time seeing something like <a href="https://github.com/actions-on-google/dialogflow-number-genie-nodejs/blob/master/functions/index.js" rel="noreferrer">this</a> in Node.js for declaring functions.
  In short, the code is similar to this</p>
  
  <pre><code>'use strict';
  const Actions = {
    ONE: 'one',
    TWO: 'two',
    THREE: 'three'
  };
  class FunMap {
  
    run(action) {
      const map = this;
      map[action]();
    }
  
    [Actions.ONE] () {
      console.log("Performing action one");
    }
  
    [Actions.TWO] () {
      console.log("Performing action two");
    }
  
    [Actions.THREE] () {
      console.log("Performing action three");
    }
  
  }
  
  var funMap = new FunMap();
  funMap.run('one');
  funMap.run('two');
  funMap.run('three');
  </code></pre>
  
  <p>The above program will print</p>
  
  <pre><code>Performing action one
  Performing action two
  Performing action three
  </code></pre>
  
  <p>Is there a technical name for this type of function declaration in Node.js / Javascript? </p>
  
  <p>How does this line put all these (<strong>functions declared by using the square brackets with a string constant</strong>) into property functions of the FunMap object?</p>
  
  <pre><code>const map = this;
  </code></pre>
  
  <p>Does the square brackets notation <code>[]</code> in a javascript class references the class itself?</p>