Files: 3d65e26e909eda26a2ae0fd4157022512389dc58 / 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