I am trying to insert values into an array one by one like java or c#.
var listOfProduct: IProduct[];
var product = new Array<IProduct>();
product.name= newName;
product.id= newId;
product.price= newPriceAfterDiscount;
this.listofproducts.push(product);
but typescript don't support that approach.
if there is another solution or idea for that i will be greatful. Thank you in advance