bestehende Objekte wurden bearbeitet
This commit is contained in:
parent
ae6887379b
commit
0202878e2c
@ -13,14 +13,14 @@ const account2 = {
|
||||
};
|
||||
|
||||
const account3 = {
|
||||
owner: "Nika Aster",
|
||||
owner: "Steven Schmidt",
|
||||
movements: [200, -200, 340, -300, -20, 50, 400, -460],
|
||||
interestRate: 0.7,
|
||||
pin: 3333,
|
||||
};
|
||||
|
||||
const account4 = {
|
||||
owner: "Eva Aster",
|
||||
owner: "Elvis Presley",
|
||||
movements: [430, 1000, 700, 50, 90],
|
||||
interestRate: 1,
|
||||
pin: 4444,
|
||||
|
||||
@ -29,14 +29,14 @@ const account2 = {
|
||||
};
|
||||
|
||||
const account3 = {
|
||||
owner: "Nika Aster",
|
||||
owner: "Steven Schmidt",
|
||||
movements: [200, -200, 340, -300, -20, 50, 400, -460],
|
||||
interestRate: 0.7,
|
||||
pin: 3333,
|
||||
};
|
||||
|
||||
const account4 = {
|
||||
owner: "Eva Aster",
|
||||
owner: "Elvis Presley",
|
||||
movements: [430, 1000, 700, 50, 90],
|
||||
interestRate: 1,
|
||||
pin: 4444,
|
||||
@ -44,5 +44,5 @@ const account4 = {
|
||||
|
||||
const accounts = [account1, account2, account3, account4];
|
||||
// im folgenden Beispiel wird das ganze Object, das der Bedienung acc.owner ==="Nika Aster" enspricht zurück gegeben
|
||||
const account = accounts.find(acc => acc.owner === "Nika Aster");
|
||||
const account = accounts.find(acc => acc.owner === "Steven Schmidt");
|
||||
console.log(account);
|
||||
|
||||
@ -19,14 +19,14 @@ const account2 = {
|
||||
};
|
||||
|
||||
const account3 = {
|
||||
owner: "Nika Aster",
|
||||
owner: "Steven Schmidt",
|
||||
movements: [200, -200, 340, -300, -20, 50, 400, -460],
|
||||
interestRate: 0.7,
|
||||
pin: 3333,
|
||||
};
|
||||
|
||||
const account4 = {
|
||||
owner: "Eva Aster",
|
||||
owner: "Elvis Presley",
|
||||
movements: [430, 1000, 700, 50, 90],
|
||||
interestRate: 1,
|
||||
pin: 4444,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user