Arrow Functions in Es 6

Es 6 has introduced new Arrow function. Let's first illustrate what an arrow function looks like, as compared to normal functions:
function foo(x,y) {
    return x + y;

// versus

var foo = (x,y) => x + y;
The arrow function definition consists of a parameter list (of zero or more parameters, and surrounding ( .. ) if there's not exactly one parameter), followed by the => marker, followed by a function body.
So, in the previous snippet, the arrow function is just the (x,y) => x + y part, and that function reference happens to be assigned to the variable foo.

Array Matching in Javscript

Array are objects in JavaScript. You can look at like this
var arr1=[1,2,3];
console.log(typeof arr1); //"object"
In javascript, comparing objects (incl. arrays) against one and other they are only compared by reference - i.e. arr1 == arr2 will only be true if they are the same array. Two separate arrays/objects that look the same are not compared by value.
To make it clearer; only the primitive values can be compared for equality - i.e. boolean, string, number. The special values null and undefined also act this way.
var arr1 = [1];
var arr2 = [1];
var arr3 = arr1;