Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 85a5f48

Browse files
committed
docs(array): update grammar, adjust style for consistency and clarity
1 parent f5b06fd commit 85a5f48

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎book/content/part02/array.asc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ Arrays are a sequential collection of elements that can be accessed randomly usi
2929

3030
==== Insertion
3131

32-
Arrays are built-in into most languages. Inserting an element is simple; you can either add them on creation time or after initialization. Below you can find an example for both cases:
32+
Arrays are a built-in part of most languages. In JavaScript, populating an array is simple; elements can either be added at the time of initialization, or after. Below you can find an example of both cases:
3333

3434
.Inserting elements into an array
3535
[source, javascript]
3636
----
37-
// (1) Add elements at the creation time:
37+
// (1) Initialize an array pre-populated with elements:
3838
const array = [2, 5, 1, 9, 6, 7];
3939
40-
// (2) initialize an empty array and add values later
40+
// (2) initialize an empty array and add elements later
4141
const array2 = [];
4242
array2[3] = 1;
4343
array2[100] = 2;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /