DEV Community

Discussion on: Functional Programming in JavaScript? Yes, Please.

Collapse
 
tiffany profile image
tiff • Edited

One is a function declaration:

function double(x)

or named function. The other is a function expression
let double = function(x)

or anonymous function.

I declared each to show how easy it is to reassign a value with an anonymous function.