W3cubDocs

/Dart 2

JsArray<E>.from constructor

JsArray<E>.from(Iterable<E> other)

Creates a new JavaScript array and initializes it to the contents of other.

Implementation

JsArray.from(Iterable<E> other)
    : super._fromJs([]..addAll(other.map(_convertToJS)));

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.5.0/dart-js/JsArray/JsArray.from.html