Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
 
var a = ["CS348", "CS353", "CS381", "CS422", "CS448", "CS490-ES0", "CS490-DSO"];
var b = ["CS348", "CS352", "CS353", "CS354", "CS381", "CS422", "CS448", "CS456", "CS473", "CS490-DSO", "CS490-ES0"];
var c = a.concat(b).filter(function(el) {
  return a.indexOf(el) > -1 && b.indexOf(el) > -1;
});
console.log(c);
console.log(a.length);
console.log(b.length);
console.log(c.length);
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
omarjmhpro
0viewers