Skip to content

Instantly share code, notes, and snippets.

@ZhenDeng
Last active June 6, 2018 01:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZhenDeng/c1f3739d0ebe7e5875fdf24794a875e4 to your computer and use it in GitHub Desktop.
Save ZhenDeng/c1f3739d0ebe7e5875fdf24794a875e4 to your computer and use it in GitHub Desktop.
shoppingCarts: ShoppingCart[] = [];
shoppingCart: ShoppingCart;
this.shoppingCarts.map((value, key) => {
if(value.id == this.shoppingCart.id){
this.shoppingCarts[key] = this.shoppingCart;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment