Files: 64b0f0923c1d166b21f730eb06c7e34533e6605d / test / test-array.js
362 bytesRaw
1 | var Array = require('../array') |
2 | var Value = require('../value') |
3 | |
4 | var value = Value('human') |
5 | var array = Array(['cat']) |
6 | array(x => console.log(x)) |
7 | |
8 | array.push('dog') |
9 | array.push('cow') |
10 | array.push(value) |
11 | array.push('chicken') |
12 | console.log('shift =>', array.shift()) |
13 | array.push('wolf') |
14 | array.insert('sheep', 0) |
15 | console.log('pop =>', array.pop()) |
16 | |
17 | value.set('monkey') |
18 |
Built with git-ssb-web