From e870294d0296acfe01b010a00139df926b7b17d4 Mon Sep 17 00:00:00 2001 From: Niels Bom Date: Sun, 31 Jan 2021 15:29:20 +0100 Subject: [PATCH] Update README.md In the first example show deletion as well. --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index fc85057..4f7d242 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,12 @@ if (!db.people) { // Update Oskar’s name to use his nickname. (This will automatically update db/people.js) db.people[2].name = 'Osky' + + // Adding another person to the family + db.people.push({name: 'Donald', age: 74}) + + // Removing is done with mutable operations like .pop and .splice + db.people.pop() } ```