<div dir="ltr">Christoph.<div><br></div><div>1) These aren't global variables, they are local to a function.</div><div><br></div><div>2) let doesn't declare a global variable.</div><div><br></div><div>3) global variables are frowned and warned about in X3D.</div><div><br></div><div>4) let is much better for scoping than var.</div><div><br></div><div>John</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 14, 2023 at 5:29 PM Christoph Valentin <<a href="mailto:christoph.valentin@gmx.at">christoph.valentin@gmx.at</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

 
  
  
 
 <div style="word-break:break-word"><div style="line-height:1;padding:0.5em">Just fyi......<br><br>When I tried to write browser stiff ecmascript for X3D Script nodes, I decided to use only var and to use it for local variables.<br><br>I avoided to have global ecmascript variables and used "field"s of the Script nodes instead.<br><br>I do not remember WHY i did this decision.<br><br>Kr,<br>CP/V<br><br>--<br>Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet.</div><div style="line-height:1;padding:0.3em"><div>Am 14.09.23, 23:01 schrieb John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>>:</div><blockquote class="gmail_quote" style="margin:0.8ex 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

  <div dir="ltr">
   Doug,
   <div>
    <br>
   </div>
   <div>
    Let me know if there's some configuration to enable ECMAScript's "let" way of declaring variables in FreeWRL.  Otherwise, I have to use var.
   </div>
   <div>
    <br>
   </div>
   <div>
    Thanks!
   </div>
   <div>
    <br>
   </div>
   <div>
    John
   </div>
  </div> _______________________________________________ x3d-public mailing list <a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a> <a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a>
 </blockquote></div></div>

</blockquote></div>