The different anonymous function declarations are slightly different and sometimes arrow functions are discourged; see the Mocha documentation, for one example.
very useful for callbacks methods, because it’s much less verbose.
lexical this (it’s picked up from surrounding environment). This helps a lot with objects: it fixes the issue of needing to use var that = this; or bind (and it doesn’t create two functions like bind does) to hold onto the value of this.
This isn’t any different to using function declarations (const example = function () {). The const createPerson example doesn’t do anything function createPerson would do either.
I was thinking that by being able to assign a function to a const, const example = function () it could be useful in terms of clarity of code, i.e. a commonly used function being “relabelled” to be more relevant to a given section of code
You would think, but generally no, if you’ve a function that’s used in many places you normally want to just use that function directly under its given name, at least within a single file – you’d likely just be obfuscating things otherwise. If it’s being imported from another file, then there are good reasons for aliasing, but you would alias like:
import { myFunction as aliasedFunction } from "./example.js";
// or if it's a default export, you're aliasing anyway:
import myFunction from "./example.js";