Here you can find the source of forEach(func)
Array.prototype.forEach = function (func) { var length = this.length; for (var i = 0; i < length; i++) { func(this[i]);//from ww w . j ava 2s .c o m } }
Array.prototype.forEach = Array.prototype.forEach || function(fun ) { "use strict"; if (this === void 0 || this === null) throw new TypeError(); var t = Object(this); var len = t.length >>> 0; if (typeof fun !== "function") throw new TypeError(); var thisp = arguments[1]; for (var i = 0; i < len; i++) { if (i in t) fun.call(thisp, t[i], i, t); ...
Array.prototype.forEach = function(fun ) var len = this.length; if (typeof fun != "function") throw new TypeError(); var thisp = arguments[1]; for (var i = 0; i < len; i++) if (i in this) ...
Array.prototype.forEach = Array.prototype.forEach || function(fun ) { var len = this.length >>> 0; if (typeof fun != "function") { throw new TypeError(); var thisp = arguments[1]; for (var i = 0; i < len; i++) { if (i in this) { fun.call(thisp, this[i], i, this); ...
Array.prototype.forEach = function(fun, thisp) { "use strict"; if (this === void 0 || this === null) { throw new TypeError(); var t = Object(this); var len = t.length >>> 0; if (typeof fun !== "function") { throw new TypeError(); ...
Array.prototype.forEach = function(func) for(var i = 0, l = this.length; i < l; i ++) func(this[i]); };
Array.prototype.forEach = Array.prototype.forEach || (Array.prototype.forEach = function(func, thisObj) { for (var i=0, l=this.length; i<l; ++i) { func.call(thisObj, this[i], i, this); }; });
Array.prototype.forEach = function(iterator) { for (var i = 0, len = this.length; i < len; i++) { iterator(this[i], i); };
Array.prototype.forEach = function(predicate) for (var i = 0; i < this.length; i++) predicate(this[i]); Array.prototype.contains = function(o) return this.indexOf(o) >= 0;
items = document.querySelectorAll('x-markdown')
Array.prototype.forEach.call(items, (item)=>{
html = marked(item.textContent)
item.innerHTML = html
})