This is my ruby code.
array1= [1,2,3,4,5]
array2= [2,3,4,5,6]
if (array1 & array2).size == 4
puts "4 match"
How can I write the same thing in javascript? Is there any material like ruby-doc in javascript?
This is my ruby code.
array1= [1,2,3,4,5]
array2= [2,3,4,5,6]
if (array1 & array2).size == 4
puts "4 match"
How can I write the same thing in javascript? Is there any material like ruby-doc in javascript?
There isn't a native method do do it. Have a look at here : Simplest code for array intersection in javascript
The best documentation I know about javascript and html5 is the Mozilla developer network.