Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ngallagher committed Feb 4, 2019
1 parent f71c7e7 commit ded8c40
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,13 +324,15 @@ let multiline = "Details
a) This is a new line
b) This is another new line";
let backtick = `A backtic can contain "quotes" and ${expressions}
let backtick = `A backtick can contain "quotes" and ${expressions}
and can span multiple lines`;
```
##### Arrays
The most basic type is the simple true or false value, which is called a 'boolean' value.
To allocate an contiguous sequence of memory an array is required. An array can be created from
any type, however arrays of numbers or bytes are created as primitive arrays internally. These
primitive arrays provide better integration with streams and buffers.
```js
let array = new String[10]; // array of strings
Expand All @@ -342,19 +344,25 @@ let long = matrix[2][3]; // reference multidimensional
#### Collections
Complex data structures can be represented with a simple and straight forward syntax. Collection types found in Java such as maps, sets, and lists can be represented as follows.
Complex data structures can be represented with a simple and straight forward syntax. Collection
types found in Java such as maps, sets, and lists can be represented as follows.
```js
let set = {1, 2, "x", "y"}; // creates a LinkedHashSet
let list = [1, 2, 3]; // creates an ArrayList
let map = {"a": 1, "b": 2}; // creates a LinkedHashSet
let empty = {:}; // creates an empty map
let mix = [1, 2, {"a": {"a", "b", [55, 66]}}]; // mix collection types
let multiline = {
name: "John Doe",
address: "Unknown",
address: {
city: "Unknown",
state: "California"
},
age: 33
};
let ascending = [0 to 9]; // range of increasing numbers
let descending = [0 from 9]; // range of decreasing numbers
```
Expand Down

0 comments on commit ded8c40

Please sign in to comment.