public
Fork of hns/helma-ng
Description: Next generation of Helma Javascript on Java web app framework
Homepage: http://dev.helma.org/ng/
Clone URL: git://github.com/zumbrunn/helma-ng.git
removed Array indexOf and lastIndexOf
matthias (author)
Wed Jul 16 07:42:06 -0700 2008
zumbrunn (committer)
Wed Jul 16 09:16:34 -0700 2008
commit  56c23fb3bdb14cdb19823a9427994083f54aa51d
tree    c401b586ff1cf1156c6408adb70b6ad2ca73c5f2
parent  e9d23cb037bd5602ea30e6402f1ad0f22ea75121
...
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
...
28
29
30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
32
33
0
@@ -28,38 +28,6 @@ var __shared__ = true;
0
 
0
 
0
 /**
0
- * Return the first index position of a value
0
- * contained in an array, or -1 if it isn't contained.
0
- * @param {Object} val the value to check
0
- * @return {int} the index of the first occurence of val, or -1
0
- */
0
-Array.prototype.indexOf = function(val) {
0
-   var i = -1;
0
-   while (i++ < this.length -1) {
0
-      if (this[i] == val)
0
-         return i;
0
-   }
0
-   return -1;
0
-};
0
-
0
-
0
-/**
0
- * return the last index position of a value 
0
- * contained in an array, or -1 if it isn't contained.
0
- * @param {Object} val the value to check
0
- * @return {int} the index of the first occurence of val, or -1
0
- */
0
-Array.prototype.lastIndexOf = function(val) {
0
-   var i = 1;
0
-   while (this.length - i++ >= 0) {
0
-      if (this[i] == val)
0
-         return i;
0
-   }
0
-   return -1;
0
-};
0
-
0
-
0
-/**
0
  * check if an array passed as argument contains
0
  * a specific value (start from end of array)
0
  * @param {Object} val the value to check

Comments