js面向对象写法及栈的实现
摘要:
1 function Stack() { 2 this.dataStore = []; 3 this.top = 0; //指向栈顶的位置 4 this.push = push; 5 this.pop = pop; 6 this.peek = peek; 7 this.clear = clear; 阅读全文
posted @ 2017-01-19 16:53 dongruiha 阅读(572) 评论(0) 推荐(0) 编辑