Files: 5be33c01238870a66c608fed4ece3fbc43069a51 / 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