@@ 111-126 (lines=16) @@ | ||
108 | var list = this; |
|
109 | return list != null && list[list.length - 1] == value; |
|
110 | }, |
|
111 | count: function(value, not = false){ |
|
112 | var list = this; |
|
113 | var total = 0; |
|
114 | for (var a = 0, al = list.length;a<al;a++){ |
|
115 | if (not) { |
|
116 | if (list[a] != value) { |
|
117 | total++; |
|
118 | } |
|
119 | }else { |
|
120 | if (list[a] == value) { |
|
121 | total++; |
|
122 | } |
|
123 | } |
|
124 | } |
|
125 | return total; |
|
126 | }, |
|
127 | or: function(list2){ |
|
128 | var list = this; |
|
129 | if (Exists(list)) { |
|
@@ 63-74 (lines=12) @@ | ||
60 | } |
|
61 | return -1; |
|
62 | }, |
|
63 | lastIndexOf: function(value){ |
|
64 | var list = this; |
|
65 | if (list.length === 0) { |
|
66 | return -1; |
|
67 | } |
|
68 | for (var a = list.length-1;a>=0;a--){ |
|
69 | if (list[a] == value){ |
|
70 | return a; |
|
71 | } |
|
72 | } |
|
73 | return -1; |
|
74 | }, |
|
75 | isEqual: function(list2){ |
|
76 | var list = this; |
|
77 | if (list == null || list2 == null) { |