diff options
author | Hrishi Hiraskar | 2016-10-02 14:52:37 +0530 |
---|---|---|
committer | GitHub | 2016-10-02 14:52:37 +0530 |
commit | 90d2b21ec32d3169e33293cdb7283f661669ac13 (patch) | |
tree | bcc9a3d7eef809cc6c3c9d6208edba0ae45456d0 /testing/SendLog/js/Queue.js | |
parent | a59ba7f22b613c5ada59c43809eab3c231721ed1 (diff) | |
download | xcos-on-web-90d2b21ec32d3169e33293cdb7283f661669ac13.tar.gz xcos-on-web-90d2b21ec32d3169e33293cdb7283f661669ac13.tar.bz2 xcos-on-web-90d2b21ec32d3169e33293cdb7283f661669ac13.zip |
Add files via upload
Diffstat (limited to 'testing/SendLog/js/Queue.js')
-rw-r--r-- | testing/SendLog/js/Queue.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/testing/SendLog/js/Queue.js b/testing/SendLog/js/Queue.js new file mode 100644 index 0000000..075a103 --- /dev/null +++ b/testing/SendLog/js/Queue.js @@ -0,0 +1,2 @@ +//code.stephenmorley.org +function Queue(){var a=[],b=0;this.getLength=function(){return a.length-b};this.isEmpty=function(){return 0==a.length};this.enqueue=function(b){a.push(b)};this.dequeue=function(){if(0!=a.length){var c=a[b];2*++b>=a.length&&(a=a.slice(b),b=0);return c}};this.peek=function(){return 0<a.length?a[b]:void 0}};
\ No newline at end of file |