Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Why is this forEach code snippet invalid in AngularJS

private calculateTotal(order: InventoryOrder):number{
    let total = 0.0;
    if(order && order.currentInventory){
        order.currentInventory.forEach(x =>{
            console.log(x.quantity);
            console.log("helloworld");
        });
    } 
    return total;
}
 
PREVIOUS NEXT
Tagged: #Why #forEach #code #snippet #invalid #AngularJS
ADD COMMENT
Topic
Name
7+2 =