I have recently come across this code with which I am unfamiliar:
const foo = () => {
/*code block here*/
}
As far as I can tell, it means the same thing as:
const foo = function () {
/*code block here*/
}
Is that a correct assumption, or are there differences? What is the correct name to refer to this bit of code? What exactly is the '=>' doing? I've never seen it in Javascript before.