JavaScript JavaScript and the DOM Making Changes to the DOM Getting and Setting Text with textContent and innerHTML

jons phyos
PRO
jons phyos
Pro Student 35 Points

what does () => on this javascript?

i don't know why he use this () => on the code, any know know what this does?

1 Answer

Steven Parker
Steven Parker
176,604 Points

That's part of "arrow function" syntax.
It indicates the beginning of the definition of an anonymous function that takes no parameters.

For more details, see the MDN page on Arrow Functions.