Why does this work:
let count = 0
const addOne = () => count += 1
And this does not:
let count = 0
const addOne = (count) => count += 1
Why does this work:
let count = 0
const addOne = () => count += 1
And this does not:
let count = 0
const addOne = (count) => count += 1
As a side note…
const addOne = (num) => count += 1 could be considered bad form - I’ve created a function that requires a parameter but doesn’t use that parameter. 