From 4a321341f49f4e18a1690d7b6adcd43a9f60cbe7 Mon Sep 17 00:00:00 2001 From: sbosse Date: Mon, 21 Jul 2025 23:15:00 +0200 Subject: [PATCH] Mon 21 Jul 22:43:21 CEST 2025 --- js/doc/list-demo.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 js/doc/list-demo.js 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());