Can someone explain me the difference between these two?

Both of them seem to log the same thing.
I'm unaware of any functional difference atwixt them, I had thought the former was simply a shortcut to save a few bytes -- making the needlessly and aggravatingly cryptic arrow functions even more so -- in cases where there's only one operation to be performed.
The laugh being the people who seem to clamor for this 'functionality' are the same ones who get pissed off when I omit {} when there's only one operation being performed after an if statement.
The closest you come to a difference is what Aakash Mallik said, and that could use a bit of clarification.
function test(a) {
return a;
}
const
fn3 = (a) => test(a),
fn4 = (a) => { return test(a); };
console.log(fn3(1));
console.log(fn4(2));
Both output the same.
You can see how in the case of the former it is SIMILAR to simply saying:
const fn5 = test;
Which is why I don't really understand why said construct even exists since that's an even shorter version.
But that's arrow functions in a nutshell, emphasis on the 'nut'. I really don't get why these were added to the language other than to take an already pointlessly murky symbol heavy language and make it even more cryptic. But I'm a "Wirth family" language (Pascal, Modula, Ada) kind of guy, we look at things differently.
Aakash Mallik
S/W Engineer @ Samsung R&D Delhi
The first function will by default return the value of console.log(a) which happens to be undefined in this case. Had it been some function that returns some value, you would have seen fn1 return its value. In the second function, it simply executes the code inside { } and would not return anything until you explicitly use the return keyword.