Can someone tell what is \"...\" in the below code in the \"Intro to Angular\" example?
getHeroes() { this.backend.getAll(Hero).then( (heroes: Hero[]) =&
It's a copy of the original array
let args = [7, 3, 8]; var [h] = args.reverse(); // args is now 8, 3, 7
whereas
var [h] = [...args].reverse(); // args is still 7, 3, 8
It can also be used to specify the remaining values of an array
var [first, ...rest] = args; // first = 7, rest = [3, 8]