import { randomIntNumbers } from "./template.js"; const movements = randomIntNumbers(14); console.log(movements); // suche nach dem ersten Target nach der Bedienung mov > 500 (gibt nur den ersten gefundenen Wert zurück) console.log(movements.find(mov => mov > 500)); const account1 = { owner: "David Aster", movements: [200, 450, -400, 3000, -650, -130, 70, 1300], interestRate: 1.2, // % pin: 1111, }; const account2 = { owner: "Joanne Aster", movements: [5000, 3400, -150, -790, -3210, -1000, 8500, -30], interestRate: 1.5, pin: 2222, }; const account3 = { owner: "Steven Schmidt", movements: [200, -200, 340, -300, -20, 50, 400, -460], interestRate: 0.7, pin: 3333, }; const account4 = { owner: "Elvis Presley", movements: [430, 1000, 700, 50, 90], interestRate: 1, pin: 4444, }; const accounts = [account1, account2, account3, account4]; // im folgenden Beispiel wird das ganze Object, das der Bedienung acc.owner ==="Steven Schmidt" enspricht zurück gegeben const account = accounts.find(acc => acc.owner === "Steven Schmidt"); console.log(account);