title: Return a different code depending on the value of a variable
body: <p>In a function I want to return a different code depending on the value of a variable.</p>
  
  <p>How to do that if the value of param1 == '-999' we do not test condition 1 (test 1).
  I could do a test for each param but I have 12 that would be so (12 * 12 = 144 test).
  This is for filter system, the value of param is equal to '-999' when the filter of this parameter is not checked. So we do not want to test this parameter.</p>
  
  <pre><code>var param1 = 'boy'; // value can be 'girl','-999'
  var param2 = '12'; // value can be '20','-999'
  var param3 = 'red'; // value can be 'blue','-999'
  
  function(feature, param1, param2, param3){
  
      return (
          feature.properties.parameter1 == param1 &amp;&amp; // test 1
          feature.properties.parameter2 == param2 &amp;&amp; // test 2
          feature.properties.parameter3 == param3    // test 3
      )   
  
  }
  </code></pre>