This is actually not an issue, but a question regarding the lesson.
ES6 provides us with the syntactic sugar to not have to write anonymous functions this way. Instead, you can use arrow function syntax:
const myFunc = () => { const myVar = "value"; return myVar; }
When there is no function body, and only a return value, arrow function syntax allows you to omit the keyword return as well as the brackets surrounding the code. This helps simplify smaller functions into one-line statements:
const myFunc= () => "value"
So in the above arrow function, how is myVar variable declared? how do i know, or JS knows what type of variable is? it inherits the function declaration, ie const? var? let?
thank you.