Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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‎

Lines changed: 7 additions & 5 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /