Array de duplication
function unique(arr) { const seen=new Map(); return arr.filter((a) =>
!seen.has(a)&& seen.set(a,1)); } //or function unique(arr) { return Array.from(
new Set(arr)) } //or [...(new Set(arr))];
seek mul(1)(2)(3), The number of calls is not limited.

Monotonous use three times
var mul = function(a){ return function(b){ return function(c){ return a*b*c;
}; }; }; function mul(x) { var product= x; var tmp = function (y) { product =
product * y;return tmp; }; tmp.toString = function () { return product ; };
return tmp; } console.log(mul(1)(2)(3)); //6 console.log(mul(1)(2)(3)(4)); //24
Find the closest common parent of two nodes
function commonParentNode(oNode1,oNode2) { var nodes1=[],nodes2=[]; while
(oNode1){ nodes1.push(oNode1); oNode1=oNode1.parentNode; } while (oNode2){
nodes2.push(oNode2); oNode2=oNode2.parentNode; } while (( a = nodes1.pop()) ===
nodes2.pop()){ node = a; } return node; } function commonParentNode
(oNode1,oNode2) { if(!oNode1||!oNode2){ return null; } for
(;oNode1;oNode1=oNode1.parentNode){if(oNode1.contains(oNode2)){ return oNode1;
} } }
seek 1000 Prime number within
function prime(n) { var arr=[]; for(var i=2;i<n;i++){ for(var j=2;j<Math
.sqrt(i);j++){if(i%j===0){ break; } } if(j>=Math.sqrt(i)){ arr.push(i); } }
return arr; }

Technology
©2019-2020 Toolsou All rights reserved,
First knowledge python Skills summary GDOI2019 travels c Linguistic 5 Three common sorting methods Python Basic knowledge and notes " Cephalosporin wine Say go and go "? DANGER ! Don't drink alcohol when taking these drugs Thorough explanation from Zhongtai vue The component page height is adaptive according to the screen size Classical algorithm - recursion ( The case of raw rabbit ) Big data tells you , How tired are Chinese women about keras use fit_generator Encountered in StopIteration