diff --git a/js/doc/list-demo.js b/js/doc/list-demo.js new file mode 100644 index 0000000..fadc4f6 --- /dev/null +++ b/js/doc/list-demo.js @@ -0,0 +1,11 @@ +var List = require('./list'); + +// instantiate +var list = new List({ + type:'-', +}); + +// list is an Array, so you can `push`, `unshift`, `splice` and friends +list.push('First line','Second line'); +list.push('A long line with more text that says list is an Array, so you can "push", "unshift", "splice" and friends'); +console.log(list.toString());