Debian Codegraph @

rhino/testsrc/doctests/test2.doctest

raw
1 // This Source Code Form is subject to the terms of the Mozilla Public
2 // License, v. 2.0. If a copy of the MPL was not distributed with this
3 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
4
5 js> a = []
6
7 js> a[0] = 10
8 10
9 js> a[1] = 11
10 11
11 js> a[3] = 13
12 13
13 js> a[4] = 14
14 14
15 js> a[5] = 15
16 15
17 js> a.reverse()
18 15,14,13,,11,10
19 js> a.reverse()
20 10,11,,13,14,15
21 js> a.concat([16,17])
22 10,11,,13,14,15,16,17