3.1 Uninitialized object? React+Redux programmers usually code action creators to simplify the creation of actions that will later be processed by a reducer. Actions are objects, which must include a type attribute that is used to determine what kind of action you are dispatching. The following code supposedly does that, but can you explain the unexpected results?
const simpleAction = t => {
type: t;
};
console.log(simpleAction("INITIALIZE"));
// undefined
3.2. Are arrows allowed? Would everything be the same if you defined listArguments() and listArguments2() using arrow functions, instead of the classic way we used, with the function keyword?
3.3. One liner. Some line-of-codes-thrifty programmer suggested rewriting doAction2() as a one-liner... though formatting doesn't let it...