What’s the meaning of “=>” (an arrow formed from equals & greater than) in JavaScript?

What It Is This is an arrow function. Arrow functions are a short syntax, introduced by ECMAscript 6, that can be used similarly to the way you would use function expressions. In other words, you can often use them in place of expressions like function (foo) {…}. But they have some important differences. For example, they do … Read more

“Uncaught SyntaxError: Cannot use import statement outside a module” when importing ECMAScript 6

I’m using ArcGIS JSAPI 4.12 and wish to use Spatial Illusions to draw military symbols on a map. When I add milsymbol.js to the script, the console returns error Uncaught SyntaxError: Cannot use import statement outside a module` so I add type=”module” to the script, and then it returns Uncaught ReferenceError: ms is not defined … Read more