Advertisement
Guest User

Untitled

a guest
May 22nd, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. let tab1 = [2,4,5,7,1,10]
  2. let tab2 = [1,3,6,7,4,2,8,11]
  3.  
  4. function przeciecieZbiorow(zbior1, zbior2) {
  5. let przeciecie = zbior1.filter(function(e){
  6. return zbior2.includes(e)
  7. })
  8. return przeciecie
  9.  
  10. }
  11. document.write(przeciecieZbiorow(tab1, tab2))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement