// This function takes a user ID and a list of orders,
// filters the orders to only those belonging to the user,
// then sums the total amount across them and returns it.
function sumUserOrders(userId: string, orders: Order[]): number {
return orders
.filter(o => o.userId === userId)
.reduce((sum, o) => sum + o.amount, 0)
}Deterministisches Parsen von Kommentarblöcken: beanstandet aufeinanderfolgende Kommentarzeilen, die die direkt folgende Deklaration paraphrasieren.