From e9c0bafc0e1f02881df626ab0ea7c23f3851216b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lasse=20J=C3=B8rgensen?= <28780271+lasjorg@users.noreply.github.com> Date: Mon, 4 Sep 2023 12:58:01 +0200 Subject: [PATCH] fix(curriculum): verbiage, return type, multiple arguments (#51474) --- .../basic-javascript/manipulate-arrays-with-push.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-push.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-push.md index ef1c120ee9f..e79fa8682db 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-push.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-push.md @@ -9,21 +9,21 @@ dashedName: manipulate-arrays-with-push # --description-- -An easy way to append data to the end of an array is via the `push()` function. +An easy way to append data to the end of an array is via the `push()` method. -`.push()` takes one or more parameters and "pushes" them onto the end of the array. +The `push()` method takes one or more arguments and appends them to the end of the array, in the order in which they appear. It returns the new length of the array. Examples: ```js const arr1 = [1, 2, 3]; -arr1.push(4); +arr1.push(4, 5); const arr2 = ["Stimpson", "J", "cat"]; arr2.push(["happy", "joy"]); ``` -`arr1` now has the value `[1, 2, 3, 4]` and `arr2` has the value `["Stimpson", "J", "cat", ["happy", "joy"]]`. +`arr1` now has the value `[1, 2, 3, 4, 5]` and `arr2` has the value `["Stimpson", "J", "cat", ["happy", "joy"]]`. # --instructions--