Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let tab1 = [2,4,5,7,1,10]
- let tab2 = [1,3,6,7,4,2,8,11]
- function przeciecieZbiorow(zbior1, zbior2) {
- let przeciecie = zbior1.filter(function(e){
- return zbior2.includes(e)
- })
- return przeciecie
- }
- document.write(przeciecieZbiorow(tab1, tab2))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement