Angular Spread Operator In Javascript