Javascript examples for Array Operation:Array Search
Find if two arrays are repeated in array and then select them
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){//from w w w. j av a 2 s .co m var array = [[1, 17], [1, 17], [1, 17], [2, 12], [5, 9], [2, 12], [6, 2], [2, 12]]; let result = array.filter((r={},a=>!(2-(r[a]=++r[a]|0)))) document.body.innerHTML=JSON.stringify(result); } </script> </head> <body> </body> </html>