Using the VBArray Object
When working with Safe Arrays in JavaScript, use the VBArray object. E.g.,
var waypoints = route.Waypoints.ToArray()
var arr = new VBArray(waypoints).toArray();
As of IE11, VBScript which includes the VBArray object that returns a SafeArray, is considered deprecated. In order to continue using this TerraExplorer API using JavaScript, add the following meta tag in the head section, to enable you to choose which version of Internet Explorer the HTML page should be rendered in (in this case IE10):
<meta http-equiv="X-UA-Compatible" content="IE=10" />