In the following (from <https://nim-lang.org/docs/backends.html)>, what is the 
point of using "{.importc.}"

Apparently it can be omitted : The example hereunder works even without it:
    
    
    <html><body>
    <script type="text/javascript">
    function addTwoIntegers(a, b)
    {
      return a + b;
    }
    </script>
    <script type="text/javascript" src="calculator.js"></script>
    </body></html>
    
    
    Run
    
    
     addTwoIntegers(a, b: int): int {.importc.}
    
    when isMainModule:
      echo addTwoIntegers(3, 7)
    
    
    Run
    
    
    nim js -o:calculator.js calculator.nim
    
    
    Run

Reply via email to