Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Belgian Biodiversity Platform
yeti
Commits
c5ff2f1b
Commit
c5ff2f1b
authored
Mar 21, 2013
by
Julien Cigar
Browse files
added Array.forEach
parent
14ca6673
Changes
1
Hide whitespace changes
Inline
Side-by-side
core.js
View file @
c5ff2f1b
...
...
@@ -140,6 +140,18 @@
};
}
/* Array.forEach
* Executes a provided function once per array element.
*/
if
(
!
Array
.
prototype
.
forEach
)
{
Array
.
prototype
.
forEach
=
function
(
callable
,
scope
)
{
for
(
var
i
=
0
,
_len
=
this
.
length
;
i
<
_len
;
++
i
)
{
callable
.
call
(
scope
,
this
[
i
],
i
,
this
);
}
}
}
/* String.trim
* Removes whitespace from both ends of the string.
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment