Skip to content

Commit b51c500

Browse files
add oop_javascript interface test
1 parent 5c80edd commit b51c500

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

OOP_javascript/interface_completejavascript.com.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
function ArraySeq(_array){
2-
var array = _array.slice();
3-
var start = 0;
4-
var end = array.length - 1;
2+
var array = _array.slice();
3+
var start = 0;
4+
var end = array.length - 1;
55

6-
this.isEmpty = function(){
7-
return end < start;
6+
this.isEmpty = function(){
7+
return end < start;
88
}
99

1010
this.get = function(idx){
@@ -53,5 +53,7 @@ function logFive(seq){
5353
}
5454
}
5555

56+
// test
5657
logFive(new ArraySeq([1, 2]));
58+
console.log("---------------");
5759
logFive(new RangeSeq(100, 1000));

0 commit comments

Comments
 (0)