title: How to create a scale dependent function that increases the size of the symbol marker using ArcGIS JS 4.11?X
body: <p>I have a variable called scale_condition</p>
  
  <pre><code>var scale_condition= 0;
  </code></pre>
  
  <p>Here i have the variable for the marker symbol. The size references the first variable scale_condition</p>
  
  <pre><code>var Facilities_Symbol = {
          type: "simple", // autocasts as new SimpleRenderer()
          symbol: {
            type: "simple-marker", // autocasts as new SimpleMarkerSymbol()
            size: scale_condition,
            color: "black",
            style: "circle"
  
          },
    };
  </code></pre>
  
  <p>Here i have a conditional statement that acknowledges the change in scale. However I also want it to assign a new scale_condition value whenever the scale parameters are met. </p>
  
  <pre><code>view.watch('scale', function(newScale) {
          console.log("Scale: ", newScale);
          if (newScale &gt; 500000) {
              scale_condition=5;
         } else {
              scale_condition=70;
          }
      });
  </code></pre>
  
  <p>My issue is that though the code acknowledges the changes of the scale it does not assign a new scale_condition value to the Facilities_Symbol variable. It's like scale_condition from the function is not linked to the scale_condition variable. I feel I am close to the solution, but need some tweaks to my code.  </p>